Skip to content
VulniPulse
Advisory severityMedium6.2Red Hat Linux

Medium [CVE-2020-12265 +1] path traversal via indexOf containment bypass allows arbitrary file write (bypass of CVE-2020-12265 fix)

This medium-severity Red Hat Linux advisory covers CVE-2026-39245 and CVE-2020-12265 affecting Red Hat Hardened Images, Red Hat Build of Keycloak.

Aggregated and source-linked by VulniPulse. Data sources, validation and limitations. This bulletin covers 2 CVEs; its score, affected versions and guidance may apply to different issues within that bulletin.

CVE-2026-39245 Source published Source updated

VulniPulse record published Record updated

Affected products & platforms
Red Hat LinuxUnclassified
Open source advisory

Summary

decompress before 4.2.2 contains an improper path containment check that enables directory traversal and arbitrary file write. The safeMakeDir function (index.js line 29) and the extraction path validation (index.js line 106) use String.indexOf() to verify the resolved path is within the output directory: realDestinationDir.indexOf(realOutputPath)!== 0.

This check is flawed because it does not enforce a path separator boundary. For example, "/tmp/app_config".indexOf("/tmp/app") returns 0, incorrectly passing the check even though /tmp/app_config is outside /tmp/app.

Combined with the unvalidated symlink creation in the same package, an attacker can write arbitrary files to directories adjacent to the extraction target. This is a bypass of the fix for CVE-2020-12265.

The correct check requires appending a path separator: realParentPath.indexOf(realOutputPath + path.sep)!== 0. A flaw was found in the `decompress` component.

Red Hat's assessment aligns with the CVSSv3.1 base score of 6.2 (Moderate) published by CVE.org/CISA for this issue. The vulnerable safeMakeDir/indexOf path-containment check described in this CVE exists only in decompress 4.2.1, the final release that addressed the earlier CVE-2020-12265 path traversal issue.

Affected products named by the advisory: Red Hat Hardened Images; Red Hat Build of Keycloak.

Affected versions
  • < 4.2.2

Official advisory · high-confidence parse· fetched 11 days ago·verify at source

Fixed versions
  • dotnet8-0-main-8.0.128-1.1.hum1
  • RHSA-2026:37577

Official advisory · high-confidence parse· fetched 11 days ago·verify at source

Mitigation checklist

Recommended fix / mitigation
  • No upstream fix is available. The decompress package is unmaintained and no 4.2.2 release was ever published. Applications should avoid extracting untrusted archives with decompress 4.2.1, or migrate to a maintained fork such as @xhmikosr/decompress.

Official advisory · high-confidence parse· fetched 11 days ago·verify at source

Get an email when Red Hat publishes the next one.

See Red Hat's last 90 days of advisories first. Then choose one product with live alerts free for life, or a free month of real-time alerts on everything with the severity, the fixed version and the vendor's link (card needed, then US$15/month; we email you before the first charge).

Alert me about Red Hat
All Red Hat Linux advisories

iPhone and Android apps · New on the App Store

Monitor future Red Hat Linux CVEs from your phone.

Choose a whole vendor or a precise platform, then receive matching security advisories by phone notification, email, or both. Coverage follows 34 official vendor sources and 160+ reviewed platform categories.

Discussion(0)

No comments yet. Share field notes, upgrade gotchas, or questions — verify against the vendor advisory before acting on community advice.

Sign in to join the discussion.