Skip to main content
Menu
Advisories

Neuvector scanner writes registry credentials world-readable to a /tmp file

GHSA-5CW8-QXQW-9J5WPublished Updated GitHub

Description

Impact

The NeuVector image scanner (neuvector/scanner) writes each per-scan task request to a temporary file on disk with mode 0644 (world-readable). This request is a serialized share.ScanImageRequest that carries the plaintext registry Username, Password, and Token used to authenticate to the image registry being scanned.

As a result, while a scan of an authenticated registry is running, the registry credentials are present in plaintext in a world-readable file under /tmp. Any other local principal on the same node — for example a co-located sidecar container sharing the pod's temporary filesystem, or another UID with read access to /tmp — can read the file and obtain the registry credentials. Depending on the privileges granted to those credentials, an attacker could then read from (and potentially write to) the affected private registry.

This is an information disclosure issue (CWE-522, Insufficiently Protected Credentials). It is the file-based IPC sibling of CVE-2025-67860 (GHSA-3c9m-gq32-g4jx / GO-2026-4490), which addressed the exposure of the same credentials via process arguments (argv / /proc/<pid>/cmdline) in the same subsystem. That fix did not cover the file-based task channel described here.

  • Affected component: Scanner (neuvector/scanner)
  • Vulnerability class: CWE-522 — Insufficiently Protected Credentials
  • Attack vector: Local

Note: Exploitation requires the following preconditions, which limits real-world exposure:

  • A lower-privilege local principal must be co-located on the same node and able to read the scanner's /tmp directory (e.g., a sidecar sharing the temporary filesystem, or another UID on the host).
  • A scan against a registry that requires authentication must be in progress (or a scanner crash must have left a stale request file behind), so that credentials are actually present on disk and within the read window.
  • The attacker must read the file during that window. The file is normally removed via a parent-side deferred cleanup after the scan completes, but a parent crash can skip cleanup and leave the credential file lingering on disk.

Patches

Patched version: v4.331

The fix sets restrictive permissions (0600) on the per-scan request file at creation time and ensures the request file is not left on the filesystem longer than necessary, so plaintext registry credentials are no longer world-readable. A fixed build has been verified to no longer expose registry credentials under /tmp.

Users are advised to upgrade to the fixed scanner version as soon as it is available.

Workarounds

There is no configuration-level workaround that fully removes the exposure. To reduce risk until the fix is deployed, operators can:

  • Avoid co-locating untrusted or lower-privilege workloads on the same node/pod as the NeuVector scanner, and avoid sharing the scanner's temporary filesystem with other containers.
  • Use registry credentials scoped with least privilege (read-only where possible) so that exposure has limited impact.
  • Rotate any registry credentials suspected of being exposed.

References

For more information

If you have any questions or comments about this advisory:

  • Open an issue in the neuvector/neuvector repository
  • Email the NeuVector security teamExpand commentComment on lines R43 to R46Resolved

Credits

Reported by Arpit Jain (GitHub handle: arpitjain099).

Affected versions

References

GitHub · neuvector/neuvector