CVE-2023-4039 | GCC's-fstack-protector fails to guard dynamically-sized local variables on AArch64

Exp

**DISPUTED**A failure in the -fstack-protector feature in GCC-based toolchains that target AArch64 allows an attacker to exploit an existing buffer overflow in dynamically-sized local variables in your application without this being detected. This stack-protector failure only applies to C99-style dynamically-sized local variables or those created using alloca(). The stack-protector operates as intended for statically-sized local variables. The default behavior when the stack-protector detects an overflow is to terminate your application, resulting in controlled loss of availability. An attacker who can exploit a buffer overflow without triggering the stack-protector might be able to change program flow control to cause an uncontrolled loss of availability or to go further and affect confidentiality or integrity. NOTE: The GCC project argues that this is a missed hardening bug and not a vulnerability by itself.

Published: 2023-09-13 Last update: 2025-02-13 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2023-4039 is rated Exploit Available (51.1/100): CVSS Medium severity, with low exploitation likelihood (EPSS 0.67%). Core evidence: 2 public exploit reference(s) are indexed (Exploit-DB). Mandatory action: Public exploits are available—assess exposure, apply mitigations, and prioritize patching.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Public exploit references (Exploit-DB) for CVE-2023-4039

EDB-ID Source Kind Published Link
nvd_ref exploit_tag Exploit-DB ↗
nvd_ref exploit_tag Exploit-DB ↗

Exploit prediction scoring system (EPSS) score for CVE-2023-4039

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 0.18% 0.67% +0.48%
2 2025-10-01 0.15% 0.18% +0.03%
3 2025-09-11 0.15%

Full EPSS history (15 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2023-4039

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
4.8 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.2 2.5 [email protected]
4.8 3.1 MEDIUM
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N Click to expand
Attack vector (AV:N)
Could be attacked over the internet or any normal routed network—not just someone sitting at the machine.
Attack complexity (AC:H)
Even with access, the exploit needs extra luck, timing, or a fussy environment to actually work.
Privileges required (PR:N)
No account or special rights needed—anonymous or random user is enough.
User interaction (UI:N)
Nobody has to click “OK” or open a trap file; it can work without a victim helping.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:L)
Some sensitive info could get out, but not a total data dump.
Integrity (I:L)
Attackers could change some data, but it’s limited—not everything goes.
Availability (A:N)
Service keeps running; no real outage angle.
2.2 2.5 [email protected]

Weakness enumeration for CVE-2023-4039

OS Trackers for CVE-2023-4039

vendor priority summary link
alpine CVE-2023-4039: 1 source package rows (gcc); 34 state rows across 8 repos (3.17-main, 3.18-main, 3.19-main, 3.20-main, 3.21-main, 3.22-main, 3.23-main, edge-main); fixed 32, open 2. https://security.alpinelinux.org/vuln/CVE-2023-4039
debian unimportant CVE-2023-4039 unimportant priority: Debian including 5 source packages (gcc-10, gcc-11, gcc-12, gcc-13, gcc-9), 11 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 8, open 3. https://security-tracker.debian.org/tracker/CVE-2023-4039
redhat https://access.redhat.com/security/cve/CVE-2023-4039
suse medium CVE-2023-4039 severity moderate: SUSE including 1369 source package names (0.0.17-1.1:libgcc_s1-13.2.1+git7813-150000.1.6.1, 0.0.17-1.1:libstdc++6-13.2.1+git7813-150000.1.6.1, …), 5792 product×package rows across 522 product lines (Container bci/bci-base-fips, Container bci/bci-init, … (522 product lines)): Fixed 5348, Known Affected 181, Known Not Affected 139, Will Not Fix 119, First Fixed 5. https://www.suse.com/security/cve/CVE-2023-4039/
ubuntu low CVE-2023-4039 low priority: Ubuntu including 65 source packages (gcc-10, gcc-10-cross, …), 780 status rows across 12 suites (bionic, focal, jammy, lunar, mantic, noble, oracular, plucky, questing, trusty, upstream, xenial): DNE 428, ignored 139, not-affected 64, needs-triage 60, needed 47, released 42. https://ubuntu.com/security/CVE-2023-4039

Affected software / configurations for CVE-2023-4039

Vendor Product Version Raw CPE
gnu gcc < 2023-09-12 cpe:2.3:a:gnu:gcc:*:*:*:*:*:*:arm64:*

References for CVE-2023-4039

cvelogic Threat Intelligence