CVE-2026-140038 PUBLISHED

Binutils: gprofng uses predictable /tmp directory with unchecked mkdir() enabling symlink-based file clobber

Assigner: redhat
Reserved: 30.11.2026 Published: 01.12.2026 Updated: 01.12.2026

A flaw was found in the gprofng component of binutils. The utility creates temporary directories in shared locations using predictable names based on user and process identifiers without verifying whether the directory already exists. A local attacker can exploit this flaw by pre-creating the expected directory and placing symbolic links inside it, causing a victim's process to overwrite or truncate arbitrary files writable by that victim.

Metrics

CVSS Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:L
CVSS Score: 5.1

Product Status

Vendor Red Hat
Product Red Hat Enterprise Linux 10
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 10
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 10
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 10
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 10
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 6
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 7
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 7
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 8
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 9
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 9
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 9
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 9
Versions Default: affected
Vendor Red Hat
Product Red Hat Enterprise Linux 9
Versions Default: affected
Vendor Red Hat
Product Red Hat Hardened Images
Versions Default: affected
Vendor Red Hat
Product Red Hat OpenShift Container Platform 4
Versions Default: affected
Vendor Red Hat
Product Red Hat OpenShift Container Platform 4
Versions Default: affected
Vendor Red Hat
Product Red Hat OpenShift Container Platform 5
Versions Default: affected
Vendor Red Hat
Product Red Hat OpenShift Container Platform 5
Versions Default: affected

Workarounds

Isolate execution environments to prevent shared temporary file access, or restrict profiling activities on shared hosts:

  1. Execute gprofng workflows within an isolated container (such as via Podman) or a dedicated mount namespace with a private /tmp filesystem, preventing other local users from pre-creating predictable temporary paths.
  2. Avoid running gprofng analysis sessions on multi-user systems where untrusted local accounts have access to the shared /tmp directory.

Caveats: Running profiling tools inside an isolated container or private namespace may restrict visibility into processes or hardware performance counters on the host system without granting additional container capabilities.

Credits

  • This issue was discovered by Found by AISLE in partnership with Red Hat.

References

Problem Types

  • Insecure Temporary File CWE