CVE-2018-12020 in Canonical Ubuntu Linux and 8 more products
mainproc.c in GnuPG before 2.2.8 mishandles the original filename during decryption and verification actions, which allows remote attackers to spoof the output that GnuPG sends on file descriptor 2 to other programs that use the "--status-fd 2" option. For example, the OpenPGP data might represent an original filena...
Affects 9 products from 4 vendors. Facts below cite their sources.
Remotely exploitable over the network, low complexity, no authentication required, no user interaction needed, impact contained to the vulnerable component, no confidentiality impact, full integrity impact, no availability impact.
Affected products and versions
| Vendor | Product | Affected versions |
|---|---|---|
| Canonical | Ubuntu Linux | 12.04 14.04 16.04 17.10 18.04 18.10+1 more19.04 |
| Debian | Debian Linux | 8.0 9.0 |
| Gnupg | Gnupg | < 2.2.8 |
| Redhat | Enterprise Linux Workstation | 6.0 7.0 |
| Redhat | Enterprise Linux Server Aus | 7.6 |
| Redhat | Enterprise Linux Server Eus | 7.5 7.6 |
| Redhat | Enterprise Linux Server Tus | 7.6 |
| Redhat | Enterprise Linux Server | 6.0 7.0 |
| Redhat | Enterprise Linux Desktop | 6.0 7.0 |
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
Vendor PSIRT: [email protected]
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Not confirmed |
Official description
mainproc.c in GnuPG before 2.2.8 mishandles the original filename during decryption and verification actions, which allows remote attackers to spoof the output that GnuPG sends on file descriptor 2 to other programs that use the "--status-fd 2" option. For example, the OpenPGP data might represent an original filename that contains line feed characters in conjunction with GOODSIG or VALIDSIG status codes.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2018-12020 |
|---|---|
| BreachSpider ID | BS-2018-GLOBAL-224295-H |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N |
| Published | 2018-06-08 |
| Last modified | 2026-06-17 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-706: CWE-706
Related attack patterns (CAPEC)
CAPEC-177 Create files with the same name as files protected with a higher classification via CWE-706
CAPEC-641 DLL Side-Loading via CWE-706
CAPEC-48 Passing Local Filenames to Functions That Expect a URL via CWE-706
CAPEC-159 Redirect Access to Libraries via CWE-706
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
This vulnerability was disclosed in 2018. A high severity vulnerability affects Canonical systems (CVE-2018-12020). No public exploit code is currently available. Isolate affected systems if patching is not feasible.
Vulnerability details: mainproc.c in GnuPG before 2.2.8 mishandles the original filename during decryption and verification actions, which allows remote attackers to spoof the output that GnuPG sends on file descriptor 2 to other programs that use the "--status-fd 2" option. For example, the OpenPGP data might represent an original filename that contains line feed characters in conjunction with GOODSIG or VALIDSIG status codes. CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N.
Questions
What is CVE-2018-12020?
This vulnerability was disclosed in 2018. A high severity vulnerability affects Canonical systems (CVE-2018-12020). No public exploit code is currently available. Isolate affected systems if patching is not feasible.
What is the CVSS score for CVE-2018-12020?
CVE-2018-12020 has CVSS 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N. EPSS: 8.2%.
Is CVE-2018-12020 actively exploited?
No confirmed active exploitation of CVE-2018-12020 as of 2026-09-25.
How do I remediate CVE-2018-12020?
Priority: MEDIUM. Advisory: https://dev.gnupg.org/T4012 PSIRT: [email protected]
What systems are affected by CVE-2018-12020?
CVE-2018-12020 affects Canonical Ubuntu Linux; Debian Debian Linux; Gnupg Gnupg; Redhat Enterprise Linux Workstation, Enterprise Linux Server Aus, Enterprise Linux Server Eus, Enterprise Linux Server Tus, Enterprise Linux Server, Enterprise Linux Desktop.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Canonical","product":"Ubuntu Linux","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-17.