Skip to main content
CVE-2025-22873VulnerabilityPublished

CVE-2025-22873: Go standard library os · Relative Path Traversal

Affects Go standard library osSource CVE Database V5

0

Not known to be exploited · CVSS 3.8 Low : upgrade to 1.24.3 or 1.23.9 when convenient.

Data as of 25 Oct 2026, 19:02 UTC

CVSS 3.1 base score
3.8Low
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 14% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 1.24.3, 1.23.9
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 4 Feb 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-25.

What to do

Upgrade Go standard library os to 1.24.3 or 1.23.9.

Affected software

ProductAffectedFixed in
Go standard libraryosAffected
  • <1.23.9
  • >=1.24.0-0 <1.24.3
Fixed in
  • 1.24.3
  • 1.23.9
Goospkg:golang/osOther threatsAffected
  • <1.23.9
  • >=1.24.0-0 <1.24.3
Fixed in
  • 1.23.9
  • 1.24.3

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

European organizations should prioritize upgrading Go to versions beyond 1.24.0-0 once official patches addressing CVE-2025-22873 are released. Until then, developers should implement additional validation on file paths passed to os.Root.Open to prevent filenames ending with "../" or other path traversal patterns. Employing strict input sanitization and canonicalization of file paths before opening them can reduce risk. Where possible, avoid relying solely on os.Root for sandboxing and complement it with OS-level sandboxing mechanisms such as containerization or mandatory access controls (e.g., AppArmor, SELinux). Conduct code audits to identify usage of os.Root.Open and assess exposure. For critical applications, consider restricting local user privileges to minimize the risk of exploitation by low-privileged users. Monitoring file system access patterns for unusual directory openings may help detect exploitation attempts. Finally, maintain awareness of updates from the Go project and apply patches promptly.

Description

CVE-2025-22873 is a relative path traversal vulnerability in the Go standard library's os package that allows opening the parent directory of a defined root directory by using a filename ending with ".. /". This vulnerability permits access only to the immediate parent directory, not to higher-level ancestors or files within the parent directory. It affects Go versions up to 1.24.0-0 and has a low CVSS score of 3.8, indicating limited impact. Exploitation requires local privileges and no user interaction but can lead to limited confidentiality exposure by allowing directory traversal beyond intended boundaries. No known exploits are currently reported in the wild. European organizations using vulnerable Go versions in applications that enforce directory restrictions via os.

References

Community reviews

Loading reviews…