REDHAT-BUG-2487946: Path Traversal

Published Jun 11, 2026
·
Updated

tmp is a temporary file and directory creator for node.js. Prior to 0.2.6, the tmp npm package contains a path traversal vulnerability that allows escaping the intended temporary directory when untrusted data flows into the prefix, postfix, or dir options. By embedding traversal sequences (e.g., ../) or path separators in these parameters, attackers can cause files to be created outside the configured temporary base directory at attacker-controlled locations with the privileges of the running process. This vulnerability affects applications that pass user-controlled data to tmp's file/directory creation functions without proper input sanitization. This vulnerability is fixed in 0.2.6.

Affected Software

1 affected component
npm/tmp<0.2.6

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade tmp/npm package to a version that resolves this vulnerability.

    Fixed in 0.2.6

Event History

Jun 11, 2026
Data Sourced
via Red Hat·05:01 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications using tmp before 0.2.6 are affected when untrusted data is passed into the prefix, postfix, or dir options of tmp file or directory creation functions. Applications that do not allow user-controlled values to reach those options are not described as vulnerable.

2

What does an attacker need to exploit it?

An attacker needs control over data supplied to the prefix, postfix, or dir options. They can use traversal sequences such as ../ or path separators to make tmp create files or directories outside the intended temporary base directory.

3

What is the impact of successful exploitation?

Files or directories can be created at attacker-controlled locations outside the configured temporary directory. Creation occurs with the privileges of the running process.

4

What can be done if upgrading is not immediately possible?

Ensure untrusted input cannot flow into the prefix, postfix, or dir options, and sanitize those values to prevent traversal sequences and path separators. Upgrade tmp to version 0.2.6 when possible.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203