# CVE-2026-50643: Out‑of‑Bounds Read in 8cc

- Severity: Medium 5.1 (CVSS:4.0, scored by CERT-PL) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.14%, higher than 3% of CVEs (2026-12-01)
- Published: 2026-06-18T08:58:01.908Z
- Modified: 2026-10-26T11:10:00.157Z
- Weaknesses: CWE-125
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: CERT-PL

## Description

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.

(As written by CVE List.)

## Affected

- rui314 8cc: b480958

## References

- <https://cert.pl/en/posts/2026/06/CVE-2026-50641> (third-party-advisory)
- <https://github.com/rui314/8cc> (product)

## Sources

- CVE List: [CVE-2026-50643](https://www.cve.org/CVERecord?id=CVE-2026-50643), CVE Terms of Use, modified 2026-06-18
- NVD: [CVE-2026-50643](https://nvd.nist.gov/vuln/detail/CVE-2026-50643), Public domain, modified 2026-10-26

---

Page: https://cve.day/CVE-2026-50643 · Whole record: https://cve.day/CVE-2026-50643.json · Rebuilt by cve.day 2026-11-25T22:59:25.118Z
