CVE-2024-21643: Microsoft.IdentityModel.Protocols.SignedHttpRequest Remote Code Execution Vulnerability
HIGHCVE-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.
CVE-2024-21643 at a Glance
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).
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.
Upgrade Microsoft.IdentityModel.Protocols.SignedHttpRequest to 6.34.0
Upgrade Microsoft.IdentityModel.Protocols.SignedHttpRequest to 7.1.2
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
CVE-2024-21643 Affected Microsoft.IdentityModel.Protocols.SignedHttpRequest Versions
2 component(s)| 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?
Which Microsoft.IdentityModel.Protocols.SignedHttpRequest versions are affected?
What version fixes CVE-2024-21643?
Is Microsoft.IdentityModel.Protocols.SignedHttpRequest affected?
What is the CVSS score of CVE-2024-21643?
What CWE is associated with CVE-2024-21643?
How can I check NuGet dependencies for CVE-2024-21643?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}