{"id":"CVE-2025-7346","aliases":["CVE-2025-7346","GHSA-x698-5hjm-w2m5","PYSEC-2026-1822"],"related":[],"kind":"vulnerability","state":"published","title":"pyLoad is vulnerable to attacks that bypass localhost restrictions, enabling the creation of arbitrary packages","summary":"Any unauthenticated attacker can bypass the localhost \nrestrictions posed by the application and utilize this to create \narbitrary packages","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Any unauthenticated attacker can bypass the localhost \nrestrictions posed by the application and utilize this to create \narbitrary packages","source":"cvelist"},{"lang":"en","text":"### Summary\nAny unauthenticated attacker can bypass the localhost restrictions posed by the application and utilize this to create arbitrary packages.\n\n### Details\nAny unauthenticated attacker can bypass the localhost restrictions posed by the application and utilize this to create arbitrary packages. This is done by changing the `Host` header to the value of `127.0.0.1:9666`.\n\n### PoC\nThe application has middleware that prevents access to several routes by checking whether the `Host` header has a specific value. We bypassed this restriction.\n\nhttps://github.com/pyload/pyload/blob/4159a1191ec4fe6d927e57a9c4bb8f54e16c381d/src/pyload/webui/app/blueprints/cnl_blueprint.py#L21-L36\n```python\n#: decorator\ndef local_check(func):\n    @wraps(func)\n    def wrapper(*args, **kwargs):\n        remote_addr = flask.request.environ.get(\"REMOTE_ADDR\", \"0\")\n        http_host = flask.request.environ.get(\"HTTP_HOST\", \"0\")\n\n        if remote_addr in (\"127.0.0.1\", \"::ffff:127.0.0.1\", \"::1\", \"localhost\") or http_host in (\n            \"127.0.0.1:9666\",\n            \"[::1]:9666\",\n        ):\n            return func(*args, **kwargs)\n        else:\n            return \"Forbidden\", 403\n\n    return wrapper\n```\n\nBelow we see that the '/flash/add' endpoint uses the middleware above.\n\nhttps://github.com/pyload/pyload/blob/4159a1191ec4fe6d927e57a9c4bb8f54e16c381d/src/pyload/webui/app/blueprints/cnl_blueprint.py#L56-L58C11\n```python\n@bp.route(\"/flash/add\", methods=[\"POST\"], endpoint=\"add\")\n@local_check\ndef add():\n```\n\nNotice how we are not authorized to access this endpoint when sending a request.\n![image](https://user-images.githubusercontent.com/44903767/294935526-64217d91-c0d1-4d8f-963f-cedfa8dc9034.png)\n\nHowever, if we set the `Host` header to be `127.0.0.1:9666`, we notice the request returns `success`.\n![image](https://user-images.githubusercontent.com/44903767/294933755-43ad3826-0e94-4ba5-acf0-48f11670cbc6.png)\n\nChecking the front end as an admin, we now see that this did indeed succeed.\n![image](https://user-images.githubusercontent.com/44903767/294934431-5d024c75-59dc-47b6-8887-b14ae91e320f.png)\n\n### Impact\nAn unauthenticated user can perform actions that should only be available to authenticated users.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Cualquier atacante no autenticado puede eludir las restricciones del host local impuestas por la aplicación y utilizar esto para crear paquetes arbitrarios.","source":"nvd"}],"published":"2025-07-08T07:05:11.861Z","modified":"2026-07-07T17:57:12.347Z","severity":{"scorer":"Toreon","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"Toreon","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-281","CWE-284","CWE-290"],"affected":[{"ranges":[{"type":"Below 0.5.0b3.dev77","introduced":"0","lastAffected":"0.5.0b3.dev77","status":"affected"}],"vendor":"Pyload","product":"Pyload","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.5.0b3.dev88"}],"ecosystem":"PyPI","package":"pyload-ng","purl":"pkg:pypi/pyload-ng","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","lastAffected":"0.5.0b3.dev88"}],"ecosystem":"PyPI","package":"pyload-ng","purl":"pkg:pypi/pyload-ng","source":"pysec"}],"references":[{"url":"https://github.com/pyload/pyload/security/advisories/GHSA-x698-5hjm-w2m5","tags":["web"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/pyload/pyload/commit/f4e2d12416ba2dfac7b036d5c8d6dab5461b9840","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pyload/pyload","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pyload/pyload/blob/4159a1191ec4fe6d927e57a9c4bb8f54e16c381d/src/pyload/webui/app/blueprints/cnl_blueprint.py#L21-L36","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pyload/pyload/blob/4159a1191ec4fe6d927e57a9c4bb8f54e16c381d/src/pyload/webui/app/blueprints/cnl_blueprint.py#L56-L58C11","tags":["web"],"sources":["ghsa","pysec"]},{"url":"https://pypi.org/project/pyload-ng","tags":["package"],"sources":["pysec"]},{"url":"https://github.com/advisories/GHSA-x698-5hjm-w2m5","tags":["advisory"],"sources":["pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-7346","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"Toreon","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2025-07-08T14:13:19.959Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-7346","url":"https://www.cve.org/CVERecord?id=CVE-2025-7346","licence":"CVE Terms of Use","modified":"2025-07-08T14:14:15.199Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-x698-5hjm-w2m5","url":"https://github.com/advisories/GHSA-x698-5hjm-w2m5","licence":"CC-BY-4.0","modified":"2026-07-07T17:57:12.347Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-7346","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-7346","licence":"Public domain","modified":"2026-06-17T10:04:46.020Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-1822","url":"https://osv.dev/vulnerability/PYSEC-2026-1822","licence":"CC-BY-4.0","modified":"2026-07-07T17:47:50.494Z"}],"updatedAt":"2026-11-25T22:59:00.797Z","epss":{"score":0.00376,"percentile":0.33695,"date":"2026-12-01T12:00:22.000Z"}}