Vulnerability DatabaseCVE-2026-118131

CVE-2026-118131: 
GNU Privacy Guard vulnerability analysis and mitigation

Overview

CVE-2026-118131 is a configuration directory hijacking vulnerability in GnuPG 2.5.21 for Windows that allows low-privilege attackers to inject malicious configuration files and achieve code execution in the victim user's security context. The vulnerability stems from insecure default DACL inheritance on the C:\ProgramData directory, which permits members of the BUILTIN\Users group to create arbitrary subdirectories. It was published on October 27, 2026, with patches referenced via GitHub Advisory and Microsoft security updates. The CVSS v3.1 base score is 9.8 (Critical) (GitHub Advisory, Microsoft MSRC).

Technical details

The root cause is a combination of insecure permission assignment (CWE-732), uncontrolled search path element (CWE-427), and creation of files/directories in insecure locations (CWE-379). Windows' default DACL inheritance on C:\ProgramData allows any member of BUILTIN\Users to create subdirectories, including the path GnuPG expects for its configuration. An attacker pre-creates this directory and populates it with malicious configuration files before GnuPG initializes, causing GnuPG components to consume attacker-controlled settings at runtime. This technique aligns with CAPEC-38 (Leveraging/Manipulating Configuration File Search Paths) and CAPEC-471 (Search Order Hijacking), and is related to MITRE ATT&CK T1574 (Hijack Execution Flow) (GitHub Advisory, Atos CyberShield).

Impact

Successful exploitation allows a low-privilege local attacker to execute arbitrary code within the security context of the victim user, achieving full confidentiality, integrity, and availability impact on that user's data and processes. While the attack does not directly escalate to SYSTEM-level privileges, it can be chained with other techniques for lateral movement or further privilege escalation. Any GnuPG-dependent application or workflow running under the victim's account — including email encryption clients and automated signing pipelines — is at risk of compromise (GitHub Advisory).

Exploitability

As of the time of publication, there is no public proof-of-concept exploit and no evidence of in-the-wild exploitation (GitHub Advisory). The EPSS score is approximately 0.19% (0.43% per GitHub Advisory), placing it in the 38th percentile for exploitation likelihood within 30 days. The NVD SSVC assessment notes the attack is automatable with total technical impact, but exploitation is currently rated as "none" observed. The CVE is not listed in the CISA Known Exploited Vulnerabilities (KEV) catalog at this time.

Exploitation steps

  1. Reconnaissance: Identify Windows systems where GnuPG 2.5.21 is installed and confirm that the C:\ProgramData\GnuPG (or equivalent) configuration directory does not yet exist.
  2. Check permissions: Verify that the local account is a member of BUILTIN\Users and confirm write access to C:\ProgramData using icacls C:\ProgramData.
  3. Create malicious directory: Before GnuPG is invoked by the victim, create the expected GnuPG configuration directory path under C:\ProgramData (e.g., mkdir C:\ProgramData\GnuPG).
  4. Inject malicious configuration: Place a crafted GnuPG configuration file (e.g., gpg.conf or dirmngr.conf) in the created directory containing directives that load attacker-controlled code or redirect GnuPG operations (e.g., specifying a malicious agent-program or keyserver-options).
  5. Trigger execution: Wait for or induce the victim user to invoke a GnuPG operation (e.g., email decryption, signature verification, or an automated script). GnuPG reads the attacker-controlled configuration and executes the injected payload within the victim's security context (GitHub Advisory, Atos CyberShield).

Indicators of compromise

  • File System: Unexpected creation of C:\ProgramData\GnuPG or related subdirectories by a non-administrative user account; presence of gpg.conf, dirmngr.conf, or other GnuPG configuration files in C:\ProgramData\GnuPG not placed by the installer.
  • Logs: Windows Security Event Log entries (Event ID 4663 or 4656) showing a low-privilege user creating directories or files under C:\ProgramData\GnuPG; audit logs showing file creation timestamps predating GnuPG installation or first legitimate use.
  • Process: Unusual child processes spawned by gpg.exe, gpg-agent.exe, or dirmngr.exe (e.g., cmd.exe, powershell.exe, curl.exe); GnuPG processes making unexpected outbound network connections.
  • Network: Outbound connections from GnuPG-related processes to unknown or suspicious IP addresses or domains not associated with legitimate keyservers.

Mitigation and workarounds

Apply the available security patches referenced in the GitHub Advisory (GHSA-c8cg-36rg-65fq) and the Microsoft Security Response Center advisory for CVE-2026-118131 (GitHub Advisory, Microsoft MSRC). As a workaround, administrators should restrict DACL permissions on C:\ProgramData to prevent members of BUILTIN\Users from creating arbitrary subdirectories — this can be done using icacls or Group Policy. Additionally, pre-create the legitimate GnuPG configuration directory with restricted permissions (writable only by administrators) to prevent attacker pre-staging. Enforce least-privilege access controls for all local user accounts on affected Windows systems.

Community reactions

The vulnerability was documented in a technical blog post by Atos CyberShield titled "A Tale of Several Hijacks and What It Taught Me About Runtime-Driven Testing," which appears to be the original research disclosure (Atos CyberShield). Beyond this research context and standard aggregator coverage, no significant broader community or social media reactions have been identified at this time.

Additional resources

Linux Distribution fix status

Fix availability across major Linux distributions and their releases.

Debian

Fixed

bookworm

gnupg2

Fixed

sid

gnupg2

Fixed

trixie

gnupg2

Fixed

Source: This report was generated using AI

Related GNU Privacy Guard vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-118131CRITICAL9.8
  • GNU Privacy Guard logoGNU Privacy Guard
  • gnupg
NoYesOct 27, 2026
CVE-2026-24882HIGH7.8
  • NixOS logoNixOS
  • gpg2
NoYesJan 27, 2026
CVE-2026-24883MEDIUM5.5
  • NixOS logoNixOS
  • cpe:2.3:a:gpg4win:gpg4win
NoYesJan 27, 2026
CVE-2026-105712LOW3.6
  • GNU Privacy Guard logoGNU Privacy Guard
  • gnupg
NoYesOct 05, 2026
CVE-2026-57062LOW2.9
  • GNU Privacy Guard logoGNU Privacy Guard
  • cpe:2.3:a:gnupg:gnupg
NoYesJun 23, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management