
Apache Tomcat FileStore deserializes a file selected by a crafted session id. Fixed in 9.0.35 / 8.5.55. Differential: traversal on vuln, refused on fixed

Быстрый сканер уязвимостей на основе YAML с шаблонным движком обнаружения для автоматизированного тестирования безопасности веб-приложений, API, сетей, DNS и облачной инфраструктуры.

Сканер безопасности веб-приложений с открытым исходным кодом для автоматического обнаружения уязвимостей, ручного тестирования на проникновение и тестирования безопасности API с помощью прокси-движка перехвата.

| CVE | CVE-2020-9484 |
| Component | Apache Tomcat — PersistentManager FileStore |
| Affected | 10.0.0-M1 to M4; 9.0.0.M1-9.0.34; 8.5.0-8.5.54; 7.0.0-7.0.103 |
| Fixed in | 9.0.35 / 8.5.55 / 7.0.103 |
| CWE | CWE-502 (Deserialization of Untrusted Data) |
| Impact | An attacker who could control a file's name and contents on the server could make FileStore deserialize it as a session when supplying a matching session id, leading to code execution. |
| Vector | crafted JSESSIONID with path traversal |
| Trigger | session id containing path separators |
The vulnerable path:
# pre-fix (model from Apache Tomcat security advisory)
attacker input accepted without the required protection
The derived guard:
# derived from observed behaviour, not copied from a vendor fix
reject session ids with path separators or dot-dot
The session id was used directly to build a file path. The fix validates it before loading.
| service | image | role |
|---|---|---|
t84-vuln | cve-2020-9484:vuln | vulnerable behaviour present |
t84-guard | cve-2020-9484:guard | fixed behaviour |
poc | cve-2020-9484-poc:local | stdlib-only Python driver |
Both sides are Python 3.12 images. The vulnerable behaviour is modelled from Apache Tomcat security advisory; the guard is derived from the lab observation that the impact is reproduced. The fixed build applies the published upstream change.
./run-lab.sh build
./run-lab.sh up
./run-lab.sh sweep
./run-lab.sh down
The lab uses the isolated cve9484lab network and bounded containers.
poc/poc.py takes a mode and an optional --host=...:
| mode | result |
|---|---|
check | exit 1 when the traversal succeeds, 0 when the id is refused |
exploit | runs the full chain and reports the observed impact |
probe | prints the traversal flag |
mitigation | explains the derived guard |
A standalone exploit ships at exploit/exploit.py:
python3 exploit/exploit.py --host=t84-vuln
It exits 1 on a confirmed finding and 0 on a guarded target.
t84-vuln (pre-fix) | t84-guard (derived) | |
|---|---|---|
| crafted request | deserialization | refused |
| ordinary request | works | works |
Captured runs are in evidence/check-*-run.txt, evidence/exploit-*-run.txt,
evidence/probe-*-run.txt, evidence/mitigation-*-run.txt,
evidence/exploit-standalone-run.txt,
evidence/exploit-standalone-fixed-run.txt, evidence/versions.txt and
evidence/0day-sweep.txt.
Podman or Docker with the cve9484lab network. No production system is
involved. Real-world exploitation needs an affected installation.
Ordinary requests still succeed on the fixed build.
README.md this write-up
run-lab.sh environment driver (build / up / sweep / down)
Makefile convenience targets
poc/poc.py the PoC (check / exploit / probe / mitigation)
exploit/exploit.py standalone exploit
lab/harness-*.py vulnerable behaviour / derived guard
lab/lab.Dockerfile builds both sides
lab/service.py HTTP wrapper (POST /check)
evidence/ captured runs on both sides
TRACKING.md working record, excluded from the repo
Этот репозиторий содержит компонент сканера для Greenbone Community Edition.