The archive/CVE-2024-23334
aio-libs/aiohttpDisclosed 2024

CVE-2024-23334:aiohttp: Path traversal

A historical CVE, retraced through the questions Lachesis asks of vulnerable code.

Historical recordv3.9.1 (affected: >= 1.0.5, < 3.9.2)
WeaknessCWE-22 · Path traversal
ImpactA path traversal in aiohttp, reachable from attacker-controlled input.
Read the reconstruction
01What happened

A request path escaped the directory aiohttp was supposed to serve, and the server returned the file it found there.

That is the shape of the failure. The rest of this case file follows the evidence behind it.

Separate the record from the run

What was known.
What Lachesis established.

01Historical record

Known before Lachesis ran

The CVE and vulnerable release were selected from public history. We are not claiming novel discovery.

CVE
CVE-2024-23334
Vulnerable target
v3.9.1 (affected: >= 1.0.5, < 3.9.2) · vulnerable
Prior knowledge
CVE-2024-23334 · v3.9.1 (affected: >= 1.0.5, < 3.9.2) is vulnerable
then
02Lachesis run
Verified captured run

Independent re-detection

The experiment graph was built around the vulnerable file aiohttp/web_urldispatcher.py (release v3.9.1, commit 6333c026), rather than starting from arbitrary aiohttp source. We did not point the tool at the CVE. Enumeration ran over the whole candidate registry (31 constructors, every family) with the pass-3 guard-differential ranker ordering leads; the filesystem path sink surfaced on its own alongside the navigation and lifecycle families, and Lachesis traced the request path into the static-file open. Every field under sast_output is the enumerator's own emission (candidate capsule plus sources_of value-flow cone); everything under adjudication is my reading of the source and fix and is labelled as such.

Seeded inputs
None
Run timestamp
2026-08-24T12:06:09Z
Evidence artifact
~/.lachesis/graphs/aiohttp_static.kuzu

The commands and outputs below come from this recorded Lachesis run.

The reconstruction, in one frame

What Lachesis reconstructed.

One historical repository. Four captured queries. A complete source-to-sink argument.

Lachesis Casefiles · Unbound ComputeVerified runCVE-2024-23334
A URL path escaped its directory. Lachesis followed the missing containment guard to the file read.
01Sourcerel_url = request.match_info["filename"]
02Sinkfilename = Path(rel_url)
03Missing guardif not self._follow_symlinks: filepath.relative_to(self._directory)
$ lachesis sources_of → reaches → guard_dominance
aio-libs/aiohttp · v3.9.1 (affected: >= 1.0.5, < 3.9.2) · vulnerableunboundcompute.com
This was known history. Your code is not.

Lachesis follows the same evidence path through unfamiliar repositories.

The Lachesis reconstruction

Here is how the path becomes visible.

These are the recorded questions Lachesis asked of the historical vulnerable code, followed by the raw result and source location each query returned.

Repositoryaio-libs/aiohttp
Revisionv3.9.1 (affected: >= 1.0.5, < 3.9.2) · vulnerable
EngineLachesis

Captured runThis is a real replay of Lachesis over the graph we built for this case. Every command below was run against the aiohttp_static.kuzu graph and every result is the output captured on that drive. We did not point the tool at a file or a family. The hunt listed the whole taxonomy first and the path containment sink came out of that. No request or payload was seeded; the graph was built from the source alone and the finding was rediscovered from graph structure, so the mode is independent-redetection.

01 · load_graph01 / 05
Lachesis ran
load_graph --path ~/.lachesis/graphs/aiohttp_static.kuzu --profile all && candidate_census

Load the graph and list every bug family

First we load the graph and ask the tool to list every bug family it knows, with nothing chosen ahead of time. It reports all 8 domains and 31 sink constructors and says the census is complete for what the graph can observe. Path containment is just one row here, not something we aimed at.

Captured resultCaptured · load_graph
raw captured outputload_graph
[lachesis-mcp] loaded the graph; overlay: 0 derived edges; dataflow tier: on demand, per cone

CANDIDATE_CENSUS
move: candidate_census
taxonomy (8):
  domain=lifecycle         title=Resource lifecycle              enumerable=True
  domain=memory            title=Memory safety                   enumerable=True
  domain=injection         title=Injection                       enumerable=True
  domain=navigation        title=Request forgery & redirection   enumerable=True
  domain=object-integrity  title=Object integrity                enumerable=True
  domain=filesystem        title=Filesystem                      enumerable=True
  domain=crypto-config     title=Cryptography & transport config enumerable=True
  domain=resource          title=Resource exhaustion             enumerable=True
constructors (31): complete_for_observable_graph=True
applied: True
role_nodes: {sink: 21, source: 15}
aiohttp/web_urldispatcher.pyline 0
Code location returned for this evidence step.
The repair

A small line with a large consequence.

Containment is validated only when follow_symlinks is off. With it on, the resolved path is never checked to stay inside the served directory.

Before
if not self._follow_symlinks:
    filepath.relative_to(self._directory)
After the patch
// always validate the resolved path against the served directory (fixed in 3.9.2, commit 1c335944).
Sources & further reading

The original record.

Read the historical advisory and vulnerability record behind this reconstruction.

Open the Lachesis quickstart