Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessCraft C file with oversized #line directive
-
DeliveryDeliver file to 8cc build environment
-
ExploitVictim or CI system compiles file with 8cc
-
ExecutionUnvalidated line number used as array index
-
PersistOut-of-bounds read triggers crash
-
ImpactCompiler process memory potentially disclosed
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, read limits
MITRE ATT&CK
1 technique across 1 tactic: Collection The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must supply a crafted C source file containing a malicious #line directive or GNU linemarker with an oversized line number value to a victim who then compiles it using 8cc. This requires either social engineering a developer into compiling the file, compromising a code repository that feeds an automated build pipeline using 8cc, or operating in a context where 8cc compiles attacker-influenced input (e.g., a code sandbox or online compilation service). The CVSS 4.0 vector AV:L constrains exploitation to scenarios where the attacker can influence the input to a locally executed 8cc process. Exploitation is limited by: (1) 8cc being a niche educational compiler not widely used in production; (2) the attacker needing to reach a system where 8cc is invoked on their input; (3) impact being confined to compiler process crash and low-confidence partial memory disclosure - not arbitrary code execution. The PR:N metric confirms no elevated privileges are required to supply the malicious file itself. |
| Impact | The CVSS 4.0 base score of 5.1 (Medium) reflects a bounded, local-exploitation scenario. The AV:L attack vector is the primary risk limiter: an attacker must deliver a malicious C source file and cause a developer or build system to compile it with 8cc. The impacts are limited to low confidentiality (VC:L - partial memory disclosure from the compiler process) and low availability (VA:L - compiler crash/denial of service); no integrity impact is indicated. No EPSS data was provided, and this CVE is not listed in CISA KEV, indicating no confirmed widespread exploitation. The absence of a vendor patch (maintainer unresponsive per CERT-PL disclosure) is a meaningful risk amplifier for any organization actively using 8cc in CI/CD pipelines or build environments that process untrusted source code. The 'Buffer Overflow' tag in the intelligence data overstates severity - this is a read primitive, not a write, and direct code execution is not a realistic impact given the CVSS vector and CWE. Real-world risk is low outside developer toolchain environments that process externally supplied or untrusted C code. |
| Exploit ScenarioDerived | An attacker crafts a C source file containing a #line directive with an arbitrarily large line number (e.g., #line 999999999) and delivers it to a developer or automated build system that uses 8cc. When the developer compiles the file, 8cc uses the attacker-supplied line number as an unvalidated array index, reading memory beyond the source line buffer, which causes an immediate compiler crash and may expose adjacent memory contents of the compiler process. No public exploit code has been identified at time of analysis, but the primitive is straightforward to trigger with a one-line crafted source file. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Jun 18, 2026
Out-of-bounds read in 8cc, a small C compiler by rui314, allows a local attacker to crash the compiler and potentially disclose compiler process memory by supplying a crafted source file containing malicious #line directives or GNU linemarkers with oversized line numbers. The vulnerability arises because attacker-controlled filename and line number metadata embedded in source files is accepted and used without bounds validation when 8cc accesses internal source line arrays. No patch is available at time of analysis; the maintainer did not respond to CERT-PL's coordinated disclosure. No public exploit identified at time of analysis, though CERT-PL confirmed the vulnerability at commit b480958.
RemediationAI
No vendor-released patch identified at time of analysis; the maintainer did not respond to CERT-PL's coordinated disclosure notification. Organizations using 8cc should immediately assess whether it is deployed in environments that compile untrusted or externally supplied C source files. The most effective compensating control is to cease using 8cc for compilation of untrusted input and substitute a maintained compiler such as GCC or Clang, which have active security response processes. If 8cc must remain in use, restrict its execution to sandboxed environments (e.g., containers with seccomp profiles or gVisor) to limit the impact of a crash or memory disclosure. Build pipelines that ingest third-party or user-submitted source code should be isolated from production networks to contain the availability and confidentiality impacts. Monitor https://github.com/rui314/8cc for any upstream commits addressing this issue and review the CERT-PL advisory at https://cert.pl/en/posts/2026/06/CVE-2026-50641 for updates.
Affected VersionsENISA
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
8cc (CPE: cpe:2.3:a:rui314:8cc:*:*:*:*:*:*:*:*) is a self-hosting C compiler targeting x86-64. The C preprocessor specification allows #line directives to override the compiler's internal record of the current source file name and line number - a legitimate feature used by preprocessors and code generators. GNU linemarkers extend this with additional flags. The root cause (CWE-125: Out-of-Bounds Read) is that 8cc stores source lines in an array and uses the attacker-supplied line number value as an index into that array without first validating that the value falls within the array's allocated bounds. Supplying a value larger than the array size causes the compiler to read memory beyond the allocated buffer, triggering a crash and potentially exposing adjacent heap or stack memory contents. The tag 'Buffer Overflow' in the intelligence data is slightly misleading - CWE-125 is a read-only out-of-bounds access, not a write overflow, and thus does not directly enable arbitrary code execution.
Know when 8Cc gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N
Local vector; victim must compile the crafted file (UI:R); no privileges needed to supply a source file; read-only impact limits C:L and A:L with no integrity effect.
Primary rating from Vendor (CERT-PL).
CVSS VectorVendor: CERT-PL
DescriptionCVE.org
8cc is vulnerable to an Out‑of‑Bounds Read due to improper handling of #line directives and GNU linemarkers. The compiler accepts attacker-controlled filename and line number metadata and later uses it without validation when accessing source line arrays. By supplying invalid or oversized line numbers, an attacker can trigger out-of-bounds memory access and a crash.
Maintainer of this project was notified early about this vulnerability, but didn't respond with the details of vulnerability or vulnerable version range. Version corresponding to the commit b480958 was tested and confirmed as vulnerable, other versions were not tested but might also be vulnerable.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
EUVD-2026-37865
GHSA-r8v3-j8rv-hmxv
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB