<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Tmp — CraftedSignal Threat Feed</title><link>https://feed.craftedsignal.io/products/tmp/</link><description>Trending threats, MITRE ATT&amp;CK coverage, and detection metadata. Fed continuously.</description><generator>Hugo</generator><language>en</language><managingEditor>hello@craftedsignal.io</managingEditor><webMaster>hello@craftedsignal.io</webMaster><lastBuildDate>Wed, 27 May 2026 00:36:17 +0000</lastBuildDate><atom:link href="https://feed.craftedsignal.io/products/tmp/feed.xml" rel="self" type="application/rss+xml"/><item><title>tmp NPM Package Path Traversal Vulnerability (CVE-2026-44705)</title><link>https://feed.craftedsignal.io/briefs/2026-05-tmp-path-traversal/</link><pubDate>Wed, 27 May 2026 00:36:17 +0000</pubDate><author>hello@craftedsignal.io</author><guid isPermaLink="true">https://feed.craftedsignal.io/briefs/2026-05-tmp-path-traversal/</guid><description>The tmp npm package contains a path traversal vulnerability (CVE-2026-44705) that allows writing files outside the intended temporary directory when untrusted data flows into the `prefix`, `postfix`, or `dir` options, leading to arbitrary file creation.</description><content:encoded><![CDATA[<p>The <code>tmp</code> npm package is vulnerable to path traversal due to insufficient input sanitization in its file and directory creation functions. By manipulating the <code>prefix</code>, <code>postfix</code>, or <code>dir</code> options, an attacker can write files to arbitrary locations on the file system. This is achieved by including traversal sequences (e.g., <code>../</code>) or absolute paths in these options, bypassing the intended temporary directory. The vulnerability affects applications that pass user-controlled data to <code>tmp</code>&rsquo;s file/directory creation functions without proper validation, allowing an attacker to create or overwrite files with the privileges of the running process. This can lead to web application configuration poisoning, cache poisoning, or other security bypasses. The affected versions are all versions prior to the fix. This was reported by Mapta / BugBunny_ai.</p>
<h2 id="attack-chain">Attack Chain</h2>
<ol>
<li>An attacker crafts malicious input containing path traversal sequences (e.g., <code>../</code>) within the <code>prefix</code>, <code>postfix</code>, or <code>dir</code> options of the <code>tmp</code> package&rsquo;s functions.</li>
<li>The application, without proper sanitization, passes this attacker-controlled input to the <code>tmp.file()</code> or <code>tmp.dir()</code> functions.</li>
<li>The <code>tmp</code> package constructs a file path by concatenating the <code>tmpdir</code>, <code>dir</code>, <code>prefix</code>, and <code>postfix</code> options.</li>
<li>The <code>path.join()</code> function normalizes the path, resolving the traversal sequences and potentially allowing the final path to escape the intended temporary directory.</li>
<li>The <code>tmp</code> package attempts to create a file or directory at the constructed path using <code>fs.writeFileSync()</code> or similar functions.</li>
<li>Due to the path traversal, the file or directory is created outside the intended temporary directory, potentially in a sensitive location.</li>
<li>Depending on the attacker&rsquo;s chosen location, they can achieve effects such as web application configuration poisoning or cache poisoning.</li>
<li>The attacker gains unauthorized access or control over the application or system.</li>
</ol>
<h2 id="impact">Impact</h2>
<p>Successful exploitation allows attackers to create files outside the intended temporary directories, leading to arbitrary file creation with the privileges of the running process. This can result in various attack scenarios, including web application configuration poisoning, cache poisoning, build pipeline compromise, container escape attempts, and multi-tenant service bypass. For instance, an attacker could overwrite application configuration files, inject malicious code into cached content, or gain access to sensitive data. The vulnerability has a CVSS v3.1 score of 8.1 (AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L).</p>
<h2 id="recommendation">Recommendation</h2>
<ul>
<li>Implement input validation and sanitization for the <code>prefix</code>, <code>postfix</code>, and <code>dir</code> options before passing them to the <code>tmp.file()</code> or <code>tmp.dir()</code> functions, as described in the Remediation section of this brief.</li>
<li>Monitor for file creation events outside expected temporary directories using file system monitoring tools, as demonstrated in the Detection and Monitoring section of this brief.</li>
<li>Deploy the Sigma rule &ldquo;Detect Suspicious tmp NPM Package Path Traversal via Prefix/Postfix&rdquo; to identify exploitation attempts by detecting path traversal sequences in process command lines.</li>
<li>Apply the safe TmpFile workaround described in the Remediation section to strip out unsafe characters.</li>
</ul>
]]></content:encoded><category domain="severity">high</category><category domain="type">advisory</category><category>path traversal</category><category>npm package</category><category>tmp</category></item></channel></rss>