Skip to main content
No exploitation reportedFix available

CVE-2018-12886

No exploitation reported by the sources we read.

  • Published2019-05-22
  • WeaknessCWE-209

Am I affected?

With a domain, we read the version its public headers and pages expose. A distribution build can carry the fix under an older number.

Description

stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.

Timeline

dates in UTC
  1. 2019-05-2219:29CVE publishedNVD

Versions per branch

NVD
Gnu gcc
BranchAffectedFixed in
8.0≥ 4.1, ≤ 8.0no fix published

as publishedRanges as NVD and OSV publish them; a distribution’s build can be fixed under an older number.

Distribution builds and vendor advisories

Packages from OSV.dev and products from the vendors' CSAF advisories.

version not verifiedVersions not verified: read as OSV.dev and the vendors publish them, not checked against each vendor's release list.

Packages

  • gcc-4.8Ubuntu:16.04:LTSall versions · no fixed version listedand 3 other packages
  • gcc-4.8Ubuntu:14.04:LTSall versions · no fixed version listed
  • gcc-6Wolfiall versions · fixed in 6.5.0-r5
  • gcc-6Ubuntu:18.04:LTSall versions · no fixed version listedand 5 other packages
  • gcc-6Chainguardall versions · fixed in 6.5.0-r5
  • gcc-7Ubuntu:20.04:LTSall versions · no fixed version listedand 2 other packages
  • gcc-snapshotUbuntu:26.10all versions · no fixed version listedand 1 other package
  • gcc-snapshotUbuntu:26.04:LTSall versions · no fixed version listedand 1 other package

3 more package ranges on OSV.dev

Vendor advisories

  • CVE-2018-12886 Red Hat Product Security

    gcc: spilling of stack protection address in cfgexpand.c and function.c leads to stack-overflow protection bypass

  • ICSA-23-348-10 CISA5 known affected

    Siemens SIMATIC S7-1500

    SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) · +2 more

  • SSA-398330 Siemens ProductCERT5 known affected

    SSA-398330: Vulnerabilities in the additional GNU/Linux subsystem of the SIMATIC S7-1500 CPU 1518(F)-4 PN/DP MFP >= V3.1.0 and < V3.1.5

    SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AB0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518-4 PN/DP MFP (6ES7518-4AX00-1AC0) >= V3.1.0 < V3.1.5 · SIMATIC S7-1500 CPU 1518F-4 PN/DP MFP (6ES7518-4FX00-1AB0) >= V3.1.0 < V3.1.5 · +2 more

  • ICSA-23-080-07 CISA9 known affected

    Siemens SCALANCE Third-Party

    SCALANCE WAM763-1 (6GK5763-1AL00-7DA0) · SCALANCE WAM766-1 (EU) (6GK5766-1GE00-7DA0) · SCALANCE WAM766-1 (US) (6GK5766-1GE00-7DB0) · +6 more

  • SSA-565386 Siemens ProductCERT9 known affected

    SSA-565386: Third-Party Component Vulnerabilities in SCALANCE W-700 IEEE 802.11ax devices before V2.0

    SCALANCE WAM763-1 (6GK5763-1AL00-7DA0) · SCALANCE WAM766-1 (EU) (6GK5766-1GE00-7DA0) · SCALANCE WAM766-1 (US) (6GK5766-1GE00-7DB0) · +6 more

Full record on NVD

Fix

  1. Vendor fix CISA ICSA-23-348-10 · 5 productsUpdate to V3.1.5 or later version
  2. Vendor fix Siemens ProductCERT SSA-398330 · 1 productUpdate to V3.1.5 or later version
  3. Vendor fix Siemens ProductCERT SSA-565386 · 9 productsUpdate to V2.0 or later version
  4. Vendor fix CISA ICSA-23-080-07 · 9 productsUpdate to V2.0 or later version
  5. Mitigation from the vendor CISA ICSA-23-348-10 · 5 productsOnly build and run applications from trusted sources.

Advisories and patches

Detection

Nuclei template
none so far
ProjectDiscovery
Exploit-DB
no entry
Exploit-DB
Proof of concept
Metasploit modules
none listed
Metasploit Framework

Sources

Identifiers

Technical details

CVSS v3 Vector
CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Published
2019-05-22
Last Modified
2026-10-14
NVD status
Modified
GitHub Advisory
GHSA-5mwp-7q9c-cgg2

Frequently asked questions

What is CVE-2018-12886?

stack_protect_prologue in cfgexpand.c and stack_protect_epilogue in function.c in GNU Compiler Collection (GCC) 4.1 through 8 (under certain circumstances) generate instruction sequences when targeting ARM targets that spill the address of the stack protector guard, which allows an attacker to bypass the protection of -fstack-protector, -fstack-protector-all, -fstack-protector-strong, and -fstack-protector-explicit against stack overflow by controlling what the stack canary is compared against.

Is CVE-2018-12886 actively exploited?

Active exploitation of CVE-2018-12886 has not been confirmed. Its EPSS score was 2.7% on 2026-11-08, the estimated probability of exploitation in the next 30 days.

What is the CVSS score for CVE-2018-12886?

CVE-2018-12886 has a CVSS v3 base score of 8.1 (HIGH severity), with vector string CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.

Running gcc? Hear about its next vulnerability

Surveillance reads the versions in your stack — a domain, a lockfile or a list — checks each CVE against the ranges its sources publish, and alerts you when one you run is exploited or enters CISA KEV. A version it cannot read stays « version not verified ».

No credit card required · No monthly cap on website lookups · 250 API requests/month

Sources for this record