Weekly pysentry audit reports 4 vulnerabilities in the HTTP stack (httpx2/httpcore2) #33
Labels
No labels
bug
contribution welcome
duplicate
enhancement
good first issue
help wanted
invalid
question
upstream
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Reference
marvin8/longwei#33
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
nox -s pysentryis failing with 4 findings across 2 packages (2 HIGH, 2 MEDIUM), all fixable by upgrading:httpcore22.3.0 (transitive, via httpx2): securewss://WebSocket traffic is sent without TLS when routed through a SOCKS proxy. A malicious proxy can read headers, cookies, query parameters, and message contents, and can impersonate the WebSocket server (CVE-2026-84381).httpx22.3.0 (direct): streaming response decompression does not bound peak memory. A 64 KiB compressed chunk can inflate ~1000x (~64 MiB) per read, causing memory pressure or OOM on attacker-influenced responses (CVE-2026-84382).httpx22.3.0 (direct): multipart part header injection — CR/LF in per-filecontent_typeor custom headers from thefiles=tuple API are serialized unvalidated into the body (CVE-2026-84379).httpx22.3.0 (direct): a caller-suppliedTransfer-Encodingheader can be combined with an auto-generatedContent-Length, producing ambiguous framing that enables request smuggling via intermediaries.Upstream fix versions: httpx2 ≥ 2.12.0 (covers all three httpx2 advisories), httpcore2 ≥ 2.10.0.
Findings from exploration
httpx2is a direct dependency pinned~=2.3inpyproject.toml;httpcore2enters the tree only through it.wssadvisory (PYSEC-2026-3844) needs httpcore2 ≥ 2.10.0 — upgrading httpx2 may pull that in itself if 2.12.0 constrains httpcore2 accordingly; this needs verification after re-locking.pytest-httpx2~=1.0must remain compatible with httpx2 2.12 — the test suite will confirm.Plan of attack
httpx2to~=2.12, re-lock, and check whichhttpcore2version resolves. If it stays below 2.10.0, add"httpcore2>=2.10.0"to[tool.uv] constraint-dependencies(alphabetical, comment citing PYSEC-2026-3844).pylock.tomlin the same commit as the dependency change.nox -s pysentryis green, then full DoD:ruff format --check .,ruff check .,ty check .,complexipy .,nox -s pytest.Release-Notes.md(taibai thread — security patches are user-facing).Branch:
fix/issue-33-bump-httpx2-securityCommits:
:arrow_up: bump: httpx2 to ~=2.12 to address PYSEC-2026-3846/3848/3849:wrench:constraint commit for httpcore2, only if still needed)PR: opened via Forgejo API targeting
mainwithCloses #33, then/skill:ci-watch.