Skip to main content

8cc Compiler CVE-2026-50643

| EUVDEUVD-2026-37865 MEDIUM
Out-of-bounds Read (CWE-125)
2026-06-18 CERT-PL GHSA-r8v3-j8rv-hmxv
5.1
CVSS 4.0 · Vendor: CERT-PL
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Craft C file with oversized #line directive
  2. Delivery
    Deliver file to 8cc build environment
  3. Exploit
    Victim or CI system compiles file with 8cc
  4. Execution
    Unvalidated line number used as array index
  5. Persist
    Out-of-bounds read triggers crash
  6. Impact
    Compiler 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.

Monitor Track and reassess. Why: Vendor states no customer action required.
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – 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

8cc b480958

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

Vendor (CERT-PL) PRIMARY 5.1 MEDIUM
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
vuln.today AI 4.4 MEDIUM

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.

3.1 AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:N/A:L
4.0 AV:L/AC:L/AT:N/PR:N/UI:P/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (CERT-PL).

CVSS VectorVendor: CERT-PL

Attack Vector
Local
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
Low
Vulnerable system: Integrity
None
Vulnerable system: Availability
Low
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

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

EPSS Score
0.2%
Top 94% exploitable
Social Media
2
Sightings
Data Quality
7 sources
Confidence: High

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.

SignalValue
Severity MEDIUM
CISA KEV No
Public POC No
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
Vendor states no customer action required
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Defer
Exploitation
None
System Exposure· derived
Small
Automatable
No
Human Impact· derived
Medium
Technical Impact
Partial

Priority Score

26
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +26
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

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.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy