Skip to content

fix(deps): require aiohttp >=3.14.1 for VULN-88795 - #123

Open
shuningc wants to merge 8 commits into
mainfrom
VULN-88795-aiohttp-upgrade
Open

fix(deps): require aiohttp >=3.14.1 for VULN-88795#123
shuningc wants to merge 8 commits into
mainfrom
VULN-88795-aiohttp-upgrade

Conversation

@shuningc

@shuningc shuningc commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes VULN-88795 by upgrading transitive aiohttp to ≥3.14.1 (lock resolves 3.14.2).

aiohttp ≤3.14.0 allows a TLS SNI server_hostname bypass on reused connections (fixed in 3.14.1).

What changed

  1. poetry.lock — regenerated from current main + vcrpy ^8.3.0:

urllib3 → 2.7.0 (was 2.5.0 on the branch — the reviewer was right)
aiohttp → 3.14.3 (via vcrpy bump)
vcrpy → 8.3.0
2. Example pins aligned (both files touched by this PR):

examples/agent/minimal-agent-example/requirements.txt: urllib3==2.6.3 → 2.7.0
examples/agent/startup-simulator-3000/requirements.txt: urllib3==2.6.3 → 2.7.0
3. Reverted accidental pyproject.toml ruff churn — PR diff is back to only vcrpy ^7.0.0 → ^8.3.0.

shuningc and others added 2 commits July 22, 2026 16:41
Add a direct aiohttp security floor to remediate the TLS SNI server_hostname
bypass on reused connections (fixed in 3.14.1). Main lock resolves aiohttp 3.14.2;
example pins bumped to 3.14.1 and the langgraph example lock regenerated (also
reconciles the previously missing ruff entry declared in its pyproject).

Co-authored-by: Cursor <cursoragent@cursor.com>
Revert the direct aiohttp dependency added in pyproject.toml to preserve the
original project structure (aiohttp stays optional/transitive via crewai/all
extras). Remediation is done purely by pinning aiohttp 3.14.2 in poetry.lock.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shuningc
shuningc marked this pull request as draft July 23, 2026 00:10
aiohttp 3.14 removed aiohttp.streams.AsyncStreamReaderMixin, which vcrpy 7.0.0's
aiohttp stub subclassed, breaking tests/test_openai_agents.py. vcrpy 8.3.0 drops
that mixin. This also removes the vcrpy-7-only urllib3<2 pin (urllib3 stays 2.5.0).

Co-authored-by: Cursor <cursoragent@cursor.com>
@shuningc
shuningc marked this pull request as ready for review July 24, 2026 20:43

@fercor-cisco fercor-cisco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key problems

[Major] Description ≠ diff. The title/summary claim a direct floor aiohttp = ">=3.14.1,<4" was added "following the idna/filelock convention." Neither is
true — pyproject.toml has no aiohttp entry (grep → 0), and no idna/filelock floors exist. The commit history shows this: cda63c0 added a direct requirement, then 8025a47 reverted to "keep aiohttp transitive, bump lock only." The description still describes the abandoned approach.

[Major] "Only aiohttp changed" is false. The lock also bumps urllib3 1.26.20 → 2.5.0 (a major version jump), bumps vcrpy 7 → 8.3.0, and drops types-requests/types-urllib3. The urllib3 2.x transition shouldn't be hidden behind an "only aiohttp" claim — it should be a conscious decision.

[Minor] Version drift: locks say 3.14.2, example requirements.txt files pin 3.14.1. Both safe, but avoidable inconsistency.

[Minor] startup-simulator-3000/requirements.txt bumps aiohttp but carries none of aiohttp 3.14's supporting deps (yarl/multidict/propcache) — worth a pipinstall -r smoke test.

The changes needed are accuracy and consistency, not code logic. The vcrpy bump is legitimate and necessary. Fix the title/description to match the transitive approach, confirm the urllib3 major bump is intentional, and reconcile the pin mismatch.

shuningc and others added 2 commits July 27, 2026 16:17
Match example requirements.txt pins to the lockfile-resolved aiohttp
version (3.14.2) to remove 3.14.1/3.14.2 drift noted in review.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate poetry.lock after merging main (content-hash conflict).
Preserves aiohttp 3.14.2 and vcrpy 8.3.0 with latest main dependency floors.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shuningc

Copy link
Copy Markdown
Contributor Author

Key problems

[Major] Description ≠ diff. The title/summary claim a direct floor aiohttp = ">=3.14.1,<4" was added "following the idna/filelock convention." Neither is true — pyproject.toml has no aiohttp entry (grep → 0), and no idna/filelock floors exist. The commit history shows this: cda63c0 added a direct requirement, then 8025a47 reverted to "keep aiohttp transitive, bump lock only." The description still describes the abandoned approach.

[Major] "Only aiohttp changed" is false. The lock also bumps urllib3 1.26.20 → 2.5.0 (a major version jump), bumps vcrpy 7 → 8.3.0, and drops types-requests/types-urllib3. The urllib3 2.x transition shouldn't be hidden behind an "only aiohttp" claim — it should be a conscious decision.

[Minor] Version drift: locks say 3.14.2, example requirements.txt files pin 3.14.1. Both safe, but avoidable inconsistency.

[Minor] startup-simulator-3000/requirements.txt bumps aiohttp but carries none of aiohttp 3.14's supporting deps (yarl/multidict/propcache) — worth a pipinstall -r smoke test.

The changes needed are accuracy and consistency, not code logic. The vcrpy bump is legitimate and necessary. Fix the title/description to match the transitive approach, confirm the urllib3 major bump is intentional, and reconcile the pin mismatch.

Dealt with the comments.

@shuningc
shuningc requested a review from fercor-cisco July 27, 2026 23:28
…grade

Regenerate poetry.lock after conflict with merged dependency PRs.

Co-authored-by: Cursor <cursoragent@cursor.com>

@fercor-cisco fercor-cisco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 This review was generated by the Astra agent (claude-opus-4-8). It may contain mistakes.

Verdict: request_changes — Lock regeneration downgrades urllib3 2.7.0→2.5.0 (reintroduces VULN-88814/CVE-2026-21441) plus cryptography, pillow, protobuf, click, python-multipart; an example's install is also broken.

General Comments

  • 🔴 critical (security): poetry.lock downgrades urllib3 from 2.7.0 → 2.5.0 (see diff around the urllib3 stanza: the merge base had a non-PyPy version = "2.7.0" entry, HEAD collapses to a single version = "2.5.0"). urllib3 is a core dependency (optional = false, groups main/test), so this is not behind an extra. Downgrading to 2.5.0 reintroduces CVE-2026-21441 — the decompression-bomb issue on redirect responses — which is exactly VULN-88814 (remediation ≥2.6.3/2.7.0). This PR is a security fix that simultaneously regresses another security fix that main had already applied.

The PR description states "This PR does not intentionally upgrade urllib3 for CPython — 2.5.0 was already in the lock." That is contradicted by the diff: the base had 2.7.0 for CPython. Please regenerate the lock from current main so urllib3 stays at ≥2.7.0 (or explicitly pin urllib3 = ">=2.7.0" / >=2.6.3). This must be resolved before merge — otherwise merging closes VULN-88795 while reopening VULN-88814.

  • 🟠 major (security): The lock regeneration produced broad, unexplained downgrades well beyond aiohttp/vcrpy: cryptography 49.0.0 → 45.0.6, pillow 12.3.0 → 11.3.0, protobuf 6.33.6 → 6.31.1, click 8.4.2 → 8.1.8, python-multipart 0.0.32 → 0.0.20, and cffi 2.x removed in favor of 1.17.1. Several of these (pillow, cryptography, python-multipart) are security-sensitive packages where downgrading can reopen fixed CVEs. This pattern strongly suggests the lock was regenerated in an environment divergent from current main (different index state / resolver inputs) rather than a clean rebase. Please regenerate poetry.lock from an up-to-date main checkout and confirm the diff contains only the intended aiohttp (+vcrpy) changes; the downgrade churn should disappear. As-is, the claim that only aiohttp/vcrpy changed is inaccurate and the collateral downgrades are a merge risk.

Follow-ups

Suggested follow-up work that could be tracked as Shortcut stories:

  • examples/agent/startup-simulator-3000/requirements.txt:3-57: aiohttp is listed twice (line 3 pinned ==3.14.2 and line 57 bare aiohttp). Deduplicate to a single pinned entry to avoid confusion in the requirements file.

Comment on lines 6 to 8
aiohappyeyeballs==2.4.6
aiohttp==3.11.12
aiohttp==3.14.2
aiosignal==1.3.2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 major (bug): aiohttp is bumped to 3.14.2, but its supporting deps in this file are left below aiohttp 3.14.2's declared floors: aiohttp 3.14.2 requires aiohappyeyeballs>=2.5.0 (pinned here to 2.4.6) and aiosignal>=1.4.0 (pinned here to 1.3.2). pip install -r requirements.txt will hit a ResolutionImpossible / produce a broken environment. The PR test plan only smoke-tested startup-simulator-3000 (which doesn't pin these two), so this file was not exercised. Bump aiohappyeyeballs>=2.5.0 and aiosignal>=1.4.0 (e.g. 2.6.1 / 1.4.0) to match aiohttp 3.14.2.

Suggested change
aiohappyeyeballs==2.4.6
aiohttp==3.11.12
aiohttp==3.14.2
aiosignal==1.3.2
aiohappyeyeballs==2.6.1
aiohttp==3.14.2
aiosignal==1.4.0

🤖 Generated by the Astra agent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

examples/agent/minimal-agent-example/requirements.txt:18-18 (line not in diff)

🟡 minor (other): This example pins urllib3==2.6.3 (which does carry the VULN-88814 fix), yet the library's own poetry.lock in this same PR pins urllib3 2.5.0. The examples are now ahead of the shipped lock on the security fix — an avoidable inconsistency. Once the lock is regenerated to keep urllib3 ≥2.7.0, align these pins (or bump the example to 2.7.0).

🤖 Generated by the Astra agent

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

shuningc and others added 2 commits July 28, 2026 23:20
Bump aiohappyeyeballs to 2.6.1 and aiosignal to 1.4.0 so explicit pins
match aiohttp 3.14.2 floors (>=2.5.0 / >=1.4.0) and pip install succeeds.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate poetry.lock from main so urllib3 stays at 2.7.0 (VULN-88814)
and aiohttp resolves to 3.14.3 via vcrpy 8.3.0. Bump urllib3 pins in
agent examples from 2.6.3 to 2.7.0 to match the shipped lock.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants