CVE-2024-31852 in Llvm products
LLVM before 18.1.3 generates code in which the LR register can be overwritten without data being saved to the stack, and thus there can sometimes be an exploitable error in the flow of control. This affects the ARM backend and can be demonstrated with Clang. NOTE: the vendor perspective is "we don't have strong obje...
Affects 0 products from 2 vendors. Facts below cite their sources.
Remotely exploitable over the network, high complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, no integrity impact, full availability impact.
Affected products and versions
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
LLVM before 18.1.3 generates code in which the LR register can be overwritten without data being saved to the stack, and thus there can sometimes be an exploitable error in the flow of control. This affects the ARM backend and can be demonstrated with Clang. NOTE: the vendor perspective is "we don't have strong objections for a CVE to be created ... It does seem that the likelihood of this miscompile enabling an exploit remains very low, because the miscompile resulting in this JOP gadget is such that the function is most likely to crash on most valid inputs to the function. So, if this function is covered by any testing, the miscompile is most likely to be discovered before the binary is shipped to production."
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2024-31852 |
|---|---|
| BreachSpider ID | BS-2024-GLOBAL-191543-M |
| CVSS vector | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H |
| Published | 2024-04-05 |
| Last modified | 2026-06-17 |
| Source | NVD |
Analysis AI-written, not human-reviewed
LLVM before version 18.1.3 generates code that can overwrite the LR register without saving its data to the stack, potentially leading to control flow errors. This issue affects the ARM backend and can be demonstrated using Clang.
An attacker could exploit this vulnerability by crafting malicious code that takes advantage of the overwritten LR register to alter the program's control flow, potentially leading to arbitrary code execution.
Questions
What is CVE-2024-31852?
LLVM before version 18.1.3 generates code that can overwrite the LR register without saving its data to the stack, potentially leading to control flow errors. This issue affects the ARM backend and can be demonstrated using Clang.
What is the CVSS score for CVE-2024-31852?
CVE-2024-31852 has CVSS 5.9 (Medium). Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H. EPSS: 1.2%.
Is CVE-2024-31852 actively exploited?
No confirmed active exploitation of CVE-2024-31852 as of 2026-09-25.
How do I remediate CVE-2024-31852?
Priority: MEDIUM.
What systems are affected by CVE-2024-31852?
CVE-2024-31852 affects Llvm; Valid.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Llvm","product":"EDS-518A","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.