CWE-36
AllowedAbsolute Path Traversal
Abstraction: Base · Status: Draft
The product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize absolute path sequences such as "/abs/path" that can resolve to a location that is outside of that directory.
245 vulnerabilities reference this CWE, most recent first.
GHSA-Q489-4F3V-W8RM
Vulnerability from github – Published: 2024-11-01 12:30 – Updated: 2024-11-01 12:30IDExpert from CHANGING Information Technology does not properly validate a specific parameter in the administrator interface, allowing remote attackers with administrator privileges to exploit this vulnerability to read arbitrary system files.
{
"affected": [],
"aliases": [
"CVE-2024-10651"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-11-01T10:15:04Z",
"severity": "MODERATE"
},
"details": "IDExpert from CHANGING Information Technology does not properly validate a specific parameter in the administrator interface, allowing remote attackers with administrator privileges to exploit this vulnerability to read arbitrary system files.",
"id": "GHSA-q489-4f3v-w8rm",
"modified": "2024-11-01T12:30:38Z",
"published": "2024-11-01T12:30:38Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-10651"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/en/cp-139-8171-29297-2.html"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/tw/cp-132-8170-48a4e-1.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-Q73M-3CG7-M23W
Vulnerability from github – Published: 2025-03-20 12:32 – Updated: 2025-03-20 12:32A local file inclusion vulnerability was identified in automatic1111/stable-diffusion-webui, affecting version git 82a973c. This vulnerability allows an attacker to read arbitrary files on the system by sending a specially crafted request to the application.
{
"affected": [],
"aliases": [
"CVE-2024-12375"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-03-20T10:15:27Z",
"severity": "MODERATE"
},
"details": "A local file inclusion vulnerability was identified in automatic1111/stable-diffusion-webui, affecting version git 82a973c. This vulnerability allows an attacker to read arbitrary files on the system by sending a specially crafted request to the application.",
"id": "GHSA-q73m-3cg7-m23w",
"modified": "2025-03-20T12:32:43Z",
"published": "2025-03-20T12:32:43Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-12375"
},
{
"type": "WEB",
"url": "https://huntr.com/bounties/21952043-395f-4cd3-9374-b73ab9612f27"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-QCP9-XRH4-RCW2
Vulnerability from github – Published: 2025-06-10 18:32 – Updated: 2025-06-10 18:32Dell Wyse Management Suite, versions prior to WMS 5.2, contain an Absolute Path Traversal vulnerability. An unauthenticated attacker with remote access could potentially exploit this vulnerability, leading to Information disclosure and Unauthorized access.
{
"affected": [],
"aliases": [
"CVE-2025-36574"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-06-10T18:15:30Z",
"severity": "HIGH"
},
"details": "Dell Wyse Management Suite, versions prior to WMS 5.2, contain an Absolute Path Traversal vulnerability. An unauthenticated attacker with remote access could potentially exploit this vulnerability, leading to Information disclosure and Unauthorized access.",
"id": "GHSA-qcp9-xrh4-rcw2",
"modified": "2025-06-10T18:32:32Z",
"published": "2025-06-10T18:32:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-36574"
},
{
"type": "WEB",
"url": "https://www.dell.com/support/kbdoc/en-us/000325679/dsa-2025-226"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-QF3R-5747-PC5R
Vulnerability from github – Published: 2025-08-22 12:30 – Updated: 2025-08-22 12:30WebITR developed by Uniong has an Arbitrary File Reading vulnerability, allowing remote attackers with regular privileges to exploit Absolute Path Traversal to download arbitrary system files.
{
"affected": [],
"aliases": [
"CVE-2025-9256"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-08-22T12:15:34Z",
"severity": "HIGH"
},
"details": "WebITR developed by Uniong has an Arbitrary File Reading vulnerability, allowing remote attackers with regular privileges to exploit Absolute Path Traversal to download arbitrary system files.",
"id": "GHSA-qf3r-5747-pc5r",
"modified": "2025-08-22T12:30:31Z",
"published": "2025-08-22T12:30:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-9256"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/en/cp-139-10329-a1c5d-2.html"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/tw/cp-132-10328-dbc35-1.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/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:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-QJ3P-G2M7-RX94
Vulnerability from github – Published: 2024-01-31 18:31 – Updated: 2024-07-09 21:30An attacker could potentially exploit this vulnerability, leading to files being read from the Honeywell Experion ControlEdge VirtualUOC and ControlEdge UOC. This exploit could be used to read files from the controller that may expose limited information from the device. Honeywell recommends updating to the most recent version of the product. See Honeywell Security Notification for recommendations on upgrading and versioning.
{
"affected": [],
"aliases": [
"CVE-2023-5390"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-01-31T18:15:46Z",
"severity": "MODERATE"
},
"details": "An attacker could potentially exploit this vulnerability, leading to files being read from the Honeywell Experion ControlEdge VirtualUOC and ControlEdge UOC. This exploit could be used to read files from the controller that may expose limited information from the device. Honeywell recommends updating to the most recent version of the product.\u00a0See Honeywell Security Notification for recommendations on upgrading and versioning.\n\n\n",
"id": "GHSA-qj3p-g2m7-rx94",
"modified": "2024-07-09T21:30:34Z",
"published": "2024-01-31T18:31:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-5390"
},
{
"type": "WEB",
"url": "https://process.honeywell.com"
},
{
"type": "WEB",
"url": "https://www.honeywell.com/us/en/product-security"
}
],
"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"
}
]
}
GHSA-QQHF-PM3J-96G7
Vulnerability from github – Published: 2026-01-12 16:10 – Updated: 2026-06-06 00:36Summary
BlueRock discovered an unauthenticated path traversal in the file upload API lets any caller read arbitrary files from the server filesystem and move them into MindsDB’s storage, exposing sensitive data.
Details
The PUT handler in file.py directly joins user-controlled data into a filesystem path when the request body is JSON and source_type is not "url":
data = request.json(line ~104) accepts attacker input without validation.file_path = os.path.join(temp_dir_path, data["file"])(line ~178) creates the path inside a temporary directory, but ifdata["file"]is absolute (e.g.,/home/secret.csv),os.path.joinignorestemp_dir_pathand targets the attacker-specified location.- The resulting path is handed to
ca.file_controller.save_file(...), which wrapsFileReader(path=source_path)(mindsdb/interfaces/file/file_controller.py:66), causing the application to read the contents of that arbitrary file. The subsequentshutil.move(file_path, ...)call also relocates the victim file into MindsDB’s managed storage.
Only multipart uploads and URL-sourced uploads receive sanitization; JSON uploads lack any call to clear_filename or equivalent checks.
PoC
- Run MindsDB in Docker:
bash docker pull mindsdb/mindsdb:latest docker run --rm -it -p 47334:47334 --name mindsdb-poc mindsdb/mindsdb:latest - Execute the exploit from the host (save as poc.py and run with
python poc.py): ```python # poc.py import requests, json
base = "http://127.0.0.1:47334" payload = {"file": "../../../../../etc/passwd"} # no source_type -> hits vulnerable branch
r = requests.put(f"{base}/api/files/leak_rel", json=payload, timeout=10) print("PUT status:", r.status_code, r.text)
q = requests.post(
f"{base}/api/sql/query",
json={"query": "SELECT * FROM files.leak_rel"},
timeout=10,
)
print("SQL response:", json.dumps(q.json(), indent=2))
``
3. The SQL response returns the contents of/etc/passwd` . The original file disappears from its source location because the handler moves it into MindsDB’s storage directory.
4. Detailed report is available on BlueRock's blog: https://www.bluerock.io/post/cve-2025-68472-mindsdb-file-upload-path-traversal
Impact
- Any user able to reach the REST API can read and exfiltrate arbitrary files that the MindsDB process can access, potentially including credentials, configuration secrets, and private keys.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "MindsDB"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "25.11.1"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-68472"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-23",
"CWE-36"
],
"github_reviewed": true,
"github_reviewed_at": "2026-01-12T16:10:55Z",
"nvd_published_at": "2026-01-12T17:15:52Z",
"severity": "HIGH"
},
"details": "### Summary\n\n[BlueRock](https://bluerock.io/) discovered an unauthenticated path traversal in the file upload API lets any caller read arbitrary files from the server filesystem and move them into MindsDB\u2019s storage, exposing sensitive data. \n\n### Details\nThe PUT handler in file.py directly joins user-controlled data into a filesystem path when the request body is JSON and `source_type` is not `\"url\"`:\n\n- `data = request.json` (line ~104) accepts attacker input without validation.\n- `file_path = os.path.join(temp_dir_path, data[\"file\"])` (line ~178) creates the path inside a temporary directory, but if `data[\"file\"]` is absolute (e.g., `/home/secret.csv`), `os.path.join` ignores `temp_dir_path` and targets the attacker-specified location.\n- The resulting path is handed to `ca.file_controller.save_file(...)`, which wraps `FileReader(path=source_path)` (`mindsdb/interfaces/file/file_controller.py:66`), causing the application to read the contents of that arbitrary file. The subsequent `shutil.move(file_path, ...)` call also relocates the victim file into MindsDB\u2019s managed storage.\n\nOnly multipart uploads and URL-sourced uploads receive sanitization; JSON uploads lack any call to `clear_filename` or equivalent checks.\n\n### PoC\n1. Run MindsDB in Docker:\n ```bash\n docker pull mindsdb/mindsdb:latest\n docker run --rm -it -p 47334:47334 --name mindsdb-poc mindsdb/mindsdb:latest\n ```\n2. Execute the exploit from the host (save as poc.py and run with `python poc.py`):\n ```python\n # poc.py\n import requests, json\n\n base = \"http://127.0.0.1:47334\"\n payload = {\"file\": \"../../../../../etc/passwd\"} # no source_type -\u003e hits vulnerable branch\n\n r = requests.put(f\"{base}/api/files/leak_rel\", json=payload, timeout=10)\n print(\"PUT status:\", r.status_code, r.text)\n\n q = requests.post(\n f\"{base}/api/sql/query\",\n json={\"query\": \"SELECT * FROM files.leak_rel\"},\n timeout=10,\n )\n print(\"SQL response:\", json.dumps(q.json(), indent=2))\n ```\n3. The SQL response returns the contents of `/etc/passwd` . The original file disappears from its source location because the handler moves it into MindsDB\u2019s storage directory.\n4. Detailed report is available on BlueRock\u0027s blog: https://www.bluerock.io/post/cve-2025-68472-mindsdb-file-upload-path-traversal\n\n### Impact\n- Any user able to reach the REST API can read and exfiltrate arbitrary files that the MindsDB process can access, potentially including credentials, configuration secrets, and private keys.",
"id": "GHSA-qqhf-pm3j-96g7",
"modified": "2026-06-06T00:36:38Z",
"published": "2026-01-12T16:10:55Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mindsdb/mindsdb/security/advisories/GHSA-qqhf-pm3j-96g7"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-68472"
},
{
"type": "PACKAGE",
"url": "https://github.com/mindsdb/mindsdb"
},
{
"type": "WEB",
"url": "https://github.com/mindsdb/mindsdb/releases/tag/v25.11.1"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/mindsdb/PYSEC-2026-90.yaml"
},
{
"type": "WEB",
"url": "https://www.bluerock.io/post/cve-2025-68472-mindsdb-file-upload-path-traversal"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "MindsDB has improper sanitation of filepath that leads to information disclosure and DOS"
}
GHSA-QV8H-RQR3-MPH9
Vulnerability from github – Published: 2026-06-10 18:31 – Updated: 2026-06-10 18:31Silverpeas through 6.4.6 mishandles the "Personal space" feature that is selected when no componentId is set.
{
"affected": [],
"aliases": [
"CVE-2026-53698"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-06-10T16:17:17Z",
"severity": "MODERATE"
},
"details": "Silverpeas through 6.4.6 mishandles the \"Personal space\" feature that is selected when no componentId is set.",
"id": "GHSA-qv8h-rqr3-mph9",
"modified": "2026-06-10T18:31:46Z",
"published": "2026-06-10T18:31:46Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-53698"
},
{
"type": "WEB",
"url": "https://github.com/Silverpeas/Silverpeas-Core/commit/caa6e6d1ac967ebd29b39e11c2ef5e7fd0047eec"
},
{
"type": "WEB",
"url": "https://github.com/Silverpeas/Silverpeas-Core/blob/983c5d07928b8a5ddcb39cc17d7fb9a0d87019b9/core-war/src/main/java/org/silverpeas/web/servlets/FileServer.java#L120-L122"
},
{
"type": "WEB",
"url": "https://github.com/Silverpeas/Silverpeas-Core/blob/983c5d07928b8a5ddcb39cc17d7fb9a0d87019b9/core-war/src/main/java/org/silverpeas/web/servlets/FileServer.java#L150-L153"
},
{
"type": "WEB",
"url": "https://tracker.silverpeas.org/issues/15229"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-QWFH-2QWH-FP23
Vulnerability from github – Published: 2026-01-16 03:30 – Updated: 2026-01-16 03:30Police Statistics Database System developed by Gotac has an Arbitrary File Read vulnerability, allowing Unauthenticated remote attacker to exploit Absolute Path Traversal to download arbitrary system files.
{
"affected": [],
"aliases": [
"CVE-2026-1018"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-01-16T03:16:18Z",
"severity": "HIGH"
},
"details": "Police Statistics Database System\u00a0developed by Gotac has an Arbitrary File Read vulnerability, allowing Unauthenticated remote attacker to exploit Absolute Path Traversal to download arbitrary system files.",
"id": "GHSA-qwfh-2qwh-fp23",
"modified": "2026-01-16T03:30:22Z",
"published": "2026-01-16T03:30:21Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-1018"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/en/cp-139-10638-0e44b-2.html"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/tw/cp-132-10637-3e4b3-1.html"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/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:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-R2HV-45G6-75GW
Vulnerability from github – Published: 2026-05-29 15:30 – Updated: 2026-05-29 15:30DreamMaker developed by Interinfo has a Path Traversal vulnerability, allowing unauthenticated remote attackers to read file names under arbitrary path by exploiting an Absolute Path Traversal vulnerability.
{
"affected": [],
"aliases": [
"CVE-2026-10075"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-05-29T14:16:26Z",
"severity": "MODERATE"
},
"details": "DreamMaker developed by Interinfo has a Path Traversal vulnerability, allowing unauthenticated remote attackers to read file names under arbitrary path by exploiting an Absolute Path Traversal vulnerability.",
"id": "GHSA-r2hv-45g6-75gw",
"modified": "2026-05-29T15:30:33Z",
"published": "2026-05-29T15:30:33Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-10075"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/en/cp-139-10946-1127f-2.html"
},
{
"type": "WEB",
"url": "https://www.twcert.org.tw/tw/cp-132-10943-8fb00-1.html"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/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:X/U:X",
"type": "CVSS_V4"
}
]
}
GHSA-R5WC-8HR9-GGP3
Vulnerability from github – Published: 2025-12-10 18:30 – Updated: 2025-12-23 15:30Barracuda Service Center, as implemented in the RMM solution, in versions prior to 2025.1.1, does not verify the URL defined in an attacker-controlled WSDL that is later loaded by the application. This can lead to arbitrary file write and remote code execution via webshell upload.
{
"affected": [],
"aliases": [
"CVE-2025-34392"
],
"database_specific": {
"cwe_ids": [
"CWE-36"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-12-10T16:16:24Z",
"severity": "CRITICAL"
},
"details": "Barracuda Service Center, as implemented in the RMM solution, in versions prior to 2025.1.1, does not verify the URL defined in an attacker-controlled WSDL that is later loaded by the application. This can lead to arbitrary file write and remote code execution via webshell upload.",
"id": "GHSA-r5wc-8hr9-ggp3",
"modified": "2025-12-23T15:30:29Z",
"published": "2025-12-10T18:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-34392"
},
{
"type": "WEB",
"url": "https://download.mw-rmm.barracudamsp.com/PDF/2025.1.1/RN_BRMM_2025.1.1_EN.pdf"
},
{
"type": "WEB",
"url": "https://labs.watchtowr.com/soapwn-pwning-net-framework-applications-through-http-client-proxies-and-wsdl"
},
{
"type": "WEB",
"url": "https://www.barracuda.com/products/msp/network-protection/rmm"
},
{
"type": "WEB",
"url": "https://www.vulncheck.com/advisories/barracuda-rmm-service-center-absolute-path-traversal-rce"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/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:X/U:X",
"type": "CVSS_V4"
}
]
}
Mitigation MIT-5.1
Strategy: Input Validation
- Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does.
- When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue."
- Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright.
- When validating filenames, use stringent allowlists that limit the character set to be used. If feasible, only allow a single "." character in the filename to avoid weaknesses such as CWE-23, and exclude directory separators such as "/" to avoid CWE-36. Use a list of allowable file extensions, which will help to avoid CWE-434.
- Do not rely exclusively on a filtering mechanism that removes potentially dangerous characters. This is equivalent to a denylist, which may be incomplete (CWE-184). For example, filtering "/" is insufficient protection if the filesystem also supports the use of "\" as a directory separator. Another possible error could occur when the filtering is applied in a way that still produces dangerous data (CWE-182). For example, if "../" sequences are removed from the ".../...//" string in a sequential fashion, two instances of "../" would be removed from the original string, but the remaining characters would still form the "../" string.
Mitigation MIT-20
Strategy: Input Validation
Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180). Make sure that the application does not decode the same input twice (CWE-174). Such errors could be used to bypass allowlist validation schemes by introducing dangerous inputs after they have been checked.
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
CAPEC-597: Absolute Path Traversal
An adversary with access to file system resources, either directly or via application logic, will use various file absolute paths and navigation mechanisms such as ".." to extend their range of access to inappropriate areas of the file system. The goal of the adversary is to access directories and files that are intended to be restricted from their access.