Vulnerabilities in pkg:nuget/Microsoft.IdentityModel.Protocols.SignedHttpRequest

PACKAGE
Advisory Identifier: GHSA-rv9j-c866-gp5h
Advisory Summary

CVE-2024-21643 is a HIGH (CVSS 7.1) remote code execution vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Microsoft.IdentityModel.Protocols.SignedHttpRequest libraries in the NuGet ecosystem. The issue involves microsoft.identitymodel.protocols.signedhttprequest remote code execution vulnerability. Remediation is available by upgrading affected packages to version 6.34.0, 7.1.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:nuget/Microsoft.IdentityModel.Protocols.SignedHttpRequest

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:nuget/Microsoft.IdentityModel.Protocols.SignedHttpRequest. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-rv9j-c866-gp5h CVE-2024-21643 HIGH Microsoft.IdentityModel.Protocols.SignedHttpRequest remote code execution vulnerability

CVE-2024-21643 at a Glance

CVE Identifier CVE-2024-21643
GHSA Identifier GHSA-rv9j-c866-gp5h
Severity HIGH
CVSS v3.1 Base Score 7.1
CWE Classification CWE-94: Improper Control of Generation of Code ('Code Injection')
Affected Product Microsoft.IdentityModel.Protocols.SignedHttpRequest
Package Ecosystem NuGet
Published Date
Last Updated

Security Impact

CVSS: 7.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability Low (A:L)

How to Fix CVE-2024-21643

To remediate this vulnerability, upgrade all affected Microsoft.IdentityModel.Protocols.SignedHttpRequest dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

Microsoft.IdentityModel.Protocols.SignedHttpRequest fixed: 6.34.0
Upgrade Microsoft.IdentityModel.Protocols.SignedHttpRequest to 6.34.0
Microsoft.IdentityModel.Protocols.SignedHttpRequest fixed: 7.1.2
Upgrade Microsoft.IdentityModel.Protocols.SignedHttpRequest to 7.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for Microsoft.IdentityModel.Protocols.SignedHttpRequest

How to Check if You Are Affected

To determine whether your application is affected by CVE-2024-21643, inspect your project dependencies for Microsoft.IdentityModel.Protocols.SignedHttpRequest:

inspect dependencies for Microsoft.IdentityModel.Protocols.SignedHttpRequest

Analyze the terminal output to locate any version of Microsoft.IdentityModel.Protocols.SignedHttpRequest in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 6.34.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Microsoft.IdentityModel.Protocols.SignedHttpRequest, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact _What kind of vulnerability is it? Who is impacted?_ Anyone leveraging the `SignedHttpRequest`protocol or the `SignedHttpRequestValidator`is vulnerable. Microsoft.IdentityModel trusts the `jku`claim by default for the `SignedHttpRequest`protocol. This raises the possibility to make any remote or local `HTTP GET` request. ### Patches _Has the problem been patched? What versions should users upgrade to?_ The vulnerability has been fixed in Microsoft.IdentityModel.Protocols.SignedHttpRequest. Users **should** update **all** their Microsoft.IdentityModel versions to 7.1.2 (for 7x) or higher, 6.34.0 (for 6x) or higher, if using Microsoft.IdentityModel.Protocols.SignedHttpRequest. ### Workarounds _Is there a way for users to fix or remediate the vulnerability without upgrading?_ No, users must upgrade. ### References _Are there any links users can visit to find out more?_ https://aka.ms/IdentityModel/Jan2024/jku

CVE-2024-21643 Affected Microsoft.IdentityModel.Protocols.SignedHttpRequest Versions

2 component(s)
Fixed Versions:
6.34.07.1.2
Product / Package Ecosystem Affected Versions Fixed Version
Microsoft.IdentityModel.Protocols.SignedHttpRequest
NuGet
< 6.34.0
6.34.0
Microsoft.IdentityModel.Protocols.SignedHttpRequest
NuGet
≥ 7.0.0-preview
< 7.1.2
7.1.2

References

Frequently Asked Questions

What is CVE-2024-21643?
CVE-2024-21643 is a security vulnerability in Microsoft.IdentityModel.Protocols.SignedHttpRequest involving Microsoft.IdentityModel.Protocols.SignedHttpRequest remote code execution vulnerability under CWE-94: Improper Control of Generation of Code ('Code Injection').
Which Microsoft.IdentityModel.Protocols.SignedHttpRequest versions are affected?
Affected versions include releases prior to 6.34.0, 7.1.2 across affected packages: Microsoft.IdentityModel.Protocols.SignedHttpRequest.
What version fixes CVE-2024-21643?
Upgrading to 6.34.0, 7.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is Microsoft.IdentityModel.Protocols.SignedHttpRequest affected?
Yes, Microsoft.IdentityModel.Protocols.SignedHttpRequest is affected in releases prior to 6.34.0, 7.1.2. Upgrade your dependency to 6.34.0, 7.1.2 or later.
What is the CVSS score of CVE-2024-21643?
CVE-2024-21643 has a CVSS v3.1 base score of 7.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2024-21643?
CVE-2024-21643 is classified under CWE-94: Improper Control of Generation of Code ('Code Injection') (The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.).
How can I check NuGet dependencies for CVE-2024-21643?
Run the dependency tree command: 'inspect dependencies for Microsoft.IdentityModel.Protocols.SignedHttpRequest'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-rv9j-c866-gp5h",
  "modified" : "2024-01-10T15:13:42Z",
  "published" : "2024-01-09T18:25:47Z",
  "aliases" : [ "CVE-2024-21643" ],
  "summary" : "Microsoft.IdentityModel.Protocols.SignedHttpRequest remote code execution vulnerability",
  "details" : "### Impact\n_What kind of vulnerability is it? Who is impacted?_\nAnyone leveraging the `SignedHttpRequest`protocol or the `SignedHttpRequestValidator`is vulnerable. Microsoft.IdentityModel trusts the `jku`claim by default for the `SignedHttpRequest`protocol. This raises the possibility to make any remote or local `HTTP GET` request. \n\n### Patches\n_Has the problem been patched? What versions should users upgrade to?_\nThe vulnerability has been fixed in Microsoft.IdentityModel.Protocols.SignedHttpRequest. Users **should** update **all** their Microsoft.IdentityModel versions to 7.1.2 (for 7x) or higher, 6.34.0 (for 6x) or higher, if using Microsoft.IdentityModel.Protocols.SignedHttpRequest.\n\n### Workarounds\n_Is there a way for users to fix or remediate the vulnerability without upgrading?_\nNo, users must upgrade.\n\n### References\n_Are there any links users can visit to find out more?_\nhttps://aka.ms/IdentityModel/Jan2024/jku",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.IdentityModel.Protocols.SignedHttpRequest"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "6.34.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "NuGet",
      "name" : "Microsoft.IdentityModel.Protocols.SignedHttpRequest"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.0.0-preview"
      }, {
        "fixed" : "7.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/security/advisories/GHSA-rv9j-c866-gp5h"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-21643"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases/tag/6.34.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/releases/tag/7.1.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/AzureAD/azure-activedirectory-identitymodel-extensions-for-dotnet/wiki/jkucve"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-94" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-01-09T18:25:47Z",
    "nvd_published_at" : "2024-01-10T05:15:09Z"
  }
}