
Case study: pyLoad CVE-2023-0297 (Click'n'Load jk evaluated by Js2Py). Demo only, not for use.

Ghidra ist ein Software-Reverse-Engineering (SRE)-Framework.

Regelbasiertes statisches und dynamisches Analyse-Tool, das Fähigkeiten in PE-, ELF-, .NET- und Shellcode-Dateien identifiziert und sie MITRE ATT&CK-Techniken zur Malware-Triage zuordnet.

Eine Neuimplementierung von YARA in Rust.
Case study of a code-injection advisory (CWE-94) in pyload/pyload: a
Click'n'Load form field is evaluated as JavaScript by the Js2Py library; the upstream fix calls
js2py.disable_pyimport() when the module is imported.
Demo only, not for use. This repository is a case study built from unmodified snapshots of pyload/pyload at two historical commits. It is not a fork and is not maintained. Do not install, deploy, or depend on it: the
baselinebranch contains code affected by the advisories below.
This branch: main holds only this index. The code is on baseline (tag poe, vulnerable) and fix (tag pone, patched).
| CVE | CVE-2023-0297 |
| GHSA | GHSA-pf38-5p22-x6h6, "Code Injection in pyload-ng", CWE-94 |
| Affected | pyload-ng < 0.5.0b3.dev31, per the GHSA record |
| Upstream fix | commit 7d73ba7919, "fix arbitrary python code execution by abusing js2py functionality", 2023-01-03 (pushed directly; no pull request) |
baselineAll line numbers are at upstream commit 6aa71cd99a.
| Location | |
|---|---|
| Ingress | Flask blueprint route @bp.route("/flash/addcrypted2", methods=["POST"]) on handler addcrypted2, src/pyload/webui/app/blueprints/cnl_blueprint.py:113-115; form field jk read at line 120 and passed to eval_js(f"{jk} f()") at line 124 |
| Guard on the route | decorator local_check (lines 22-36) admits the request when REMOTE_ADDR is a loopback address or the Host header is 127.0.0.1:9666 or [::1]:9666 |
| Wrapper | first-party eval_js(script, es6=False), src/pyload/core/utils/misc.py:25-27 |
| Sink | (js2py.eval_js6 if es6 else js2py.eval_js)(script) at misc.py:27: a call into the Js2Py dependency |
The first-party wrapper and the dependency function are both named eval_js.
At 7d73ba7919, src/pyload/core/utils/misc.py calls js2py.disable_pyimport() at module level
(line 8)
and drops two unused imports. The route, the wrapper and the call into Js2Py are all unchanged; the fix changes
Js2Py's configuration, not the call path.
This is not a fork: a fresh repository whose code branches hold upstream source snapshots, with no upstream history and no upstream remote.
| Branch | Tag | Upstream commit | Date | Snapshot commit | Snapshot tree |
|---|---|---|---|---|---|
baseline | poe | 6aa71cd99a | 2022-12-11 | f6f518a5be9b5f0f19c694bb2aed5c15eeaa102c | 210c38eeeb0a3bef006841b6338d76cade8dcef6 |
fix | pone | 7d73ba7919 | 2023-01-03 | bfee6cd3da32a30d3ba2847a3aaf5cf51c687d15 | 196f4cb288021a36f2d48b0b02e488f51a345e19 |
Each snapshot commit is the upstream tree at that commit with one change: .github/workflows/ (4 files) is
removed so that upstream CI does not run here. No other file is added, removed, or edited. The fix snapshot's
parent is the baseline snapshot, so the diff between the two snapshot commits
(compare) is exactly the upstream fix commit's diff. On each code branch, a second
commit replaces upstream's README.md with a branch-specific version of this file; upstream's README is in the snapshot commit.
To check a snapshot against upstream from a clone of this repository:
git fetch https://github.com/pyload/pyload 6aa71cd99a6f510de7137d17ec99f930916704c0
git diff --stat FETCH_HEAD f6f518a5be9b5f0f19c694bb2aed5c15eeaa102c # lists only .github/workflows/*
| Tag | Commit | Pins |
|---|---|---|
poe | 738685134d23c8334df4f59cfe1400c732ff9402 | baseline: vulnerable snapshot plus this README |
pone | 66857f07d6568e32af0ba27db8aa3bcb7afec57f | fix: patched snapshot plus this README |
pyLoad is licensed under the GNU Affero General Public License v3 (LICENSE.md, kept verbatim at the root of the
baseline and fix branches; upstream ships no NOTICE file). This repository is a modified copy within the
meaning of AGPL-3.0 section 5: on 2026-10-07, .github/workflows/ was removed and this README.md replaced
upstream's. Nothing else was changed. The complete corresponding source is this repository; the original is at
https://github.com/pyload/pyload.