GnuPG: Creation of Temporary File in Directory with Insecure Permissions
CVE-2026-118131 is a critical-severity creation of temporary file in directory with insecure permissions vulnerability in GnuPG, with a CVSS 3.1 base score of 9.8 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. Affected GnuPG versions: 2.5.21. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 0.43% chance of exploitation within 30 days, which is low compared with other CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Check which version of GnuPG you run against the affected versions below, and install the vendor's latest release.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H. Scored by CISA (ADP).
Official description
GnuPG (version 2.5.21) for Windows contains a vulnerability where default Discretionary Access Control List (DACL) inheritance on the C:\ProgramData directory allows members of the BUILTIN\Users group to create arbitrary subdirectories under this path. An attacker with low-privilege access can create the expected GnuPG configuration directory and inject malicious configuration files consumed by GnuPG components. This can result in code execution within the security context of the victim user.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Creation of Temporary File in Directory with Insecure Permissions
The product creates a temporary file in a directory whose permissions allow unintended actors to determine the file's existence or otherwise access that file.
How developers prevent this class of flaw
- Many contemporary languages have functions which properly handle this condition. Older C temp file functions are especially susceptible.
- Try to store sensitive tempfiles in a directory which is not world readable -- i.e., per-user directories.
- Avoid using vulnerable temp file functions.
More Creation of Temporary File in Directory with Insecure Permissions vulnerabilities (CWE-379)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Other references
Other vulnerabilities in GnuPG
- 9.8 Critical severity
- 7.0 High severity
- 9.8 Critical severity
Recent Creation of Temporary File in Directory with Insecure Permissions vulnerabilities
- 7.1 High severity
- 7.8 High severity
- 7.0 High severity
- 7.7 High severity
- 7.3 High severity
- 7.3 High severity
Spotted an error? Tell us.