Skip to content

backend: bump 10 Python deps for 1 CRITICAL + 16 HIGH CVEs - #7126

Merged
mdmohsin7 merged 10 commits into
mainfrom
charles/fix-backend-python-vulns
May 2, 2026
Merged

mdmohsin7 merged 10 commits into
mainfrom
charles/fix-backend-python-vulns

Conversation

@mdmohsin7

Copy link
Copy Markdown
Member

Summary

10 atomic commits, one per package family, fixing the safer Python CVEs flagged by Artifact Registry on the deployed backend image (gcr.io/based-hardware/backend@sha256:a0ef24d4…, revision backend-00979-8l8):

Commit Package Was → Now CVEs (sev)
1 h11 + httpcore 0.14.0→0.16.0 / 1.0.5→1.0.9 CVE-2025-43859 (CRITICAL 9.1)
2 urllib3 2.2.2→2.6.3 CVE-2025-66471, CVE-2026-21441, CVE-2025-66418 (3× HIGH)
3 tornado 6.4.1→6.5.5 CVE-2025-47287, CVE-2026-31958, CVE-2024-52804, CVE-2026-35536 (4× HIGH)
4 PyJWT 2.9.0→2.12.0 CVE-2026-32597 (HIGH)
5 pyasn1 0.6.0→0.6.3 CVE-2026-30922 (HIGH)
6 orjson 3.10.6→3.11.6 CVE-2025-67221 (HIGH)
7 GitPython 3.1.43→3.1.47 GHSA-rpm5-65cw-6hj4, GHSA-x2qx-6953-8485 (2× HIGH)
8 python-multipart 0.0.9→0.0.22 CVE-2024-53981, CVE-2026-24486 (2× HIGH)
9 aiohttp + cascade 3.9.5→3.13.3 (+ aiohappyeyeballs, aiosignal, yarl) CVE-2025-69223 (HIGH)
10 langchain-core 0.3.79→0.3.81 CVE-2025-68664 (CRITICAL), CVE-2025-65106 (HIGH)

Net: 1 CRITICAL + 16 HIGH closed across 10 commits, all atomic / independently revertible.

Deferred to a follow-up PR

Risky/major bumps live in a follow-up PR rather than this one to keep the blast radius small:

  • cryptography 43→46 (3 majors)
  • pillow 10.4→12.2 (2 majors)
  • protobuf 4.25→5.x (1 major, cascades grpc)
  • starlette 0.37→0.40 (cascades fastapi)
  • langgraph-checkpoint 2→3 + langchain-core 0.3.81→1.2 (langchain stack major)
  • Transitives jaraco-context 5.3→6.1 and wheel 0.45→0.46

Test plan

For each commit:

  1. Update requirements.txt
  2. Rebuild a local Dockerfile.test image (Python 3.11-slim, requirements.txt minus the source-built lc3py) — only the pip install layer rebuilds (~30-90s)
  3. Run a baseline-green subset of unit tests (190 tests across 11 files: text similarity/containment, speaker_sample, async_auth, auth_redirect_uri, prompt_caching, llm_usage_db/tracker, short_audio_embedding, voice_message_language, users_add_sample_transaction)
  4. Confirm bumped package version installed correctly
  5. Commit only if all tests pass

All 10 commits are individually green. Two commits required cascade pins to satisfy upstream: httpcore was bumped alongside h11, and aiohappyeyeballs/aiosignal/yarl were bumped alongside aiohttp.

Verifying after deploy

  • Re-scan the rebuilt image in Artifact Registry → Vulnerabilities; expect the 17 listed CVEs to clear.
  • Smoke-check /health and a representative auth + transcribe endpoint.

mdmohsin7 added 10 commits May 2, 2026 10:23
h11: 0.14.0 -> 0.16.0 fixes CVE-2025-43859 (CVSS 9.1 Critical):
chunked-encoding leniency that allowed request smuggling against
upstream proxies.

httpcore pinned at 1.0.5 caps h11<0.15 — bump to 1.0.9 (h11 ^0.16)
to allow the upgrade.

Verified: docker test image rebuilt; subset of unit tests
(text/auth/llm/voice/embedding/transactions) all pass; h11 0.16.0
and httpcore 1.0.9 confirmed installed.
urllib3: 2.2.2 -> 2.6.3 fixes:
- CVE-2025-66471 (HIGH 7.5)
- CVE-2026-21441 (HIGH 7.5)
- CVE-2025-66418 (HIGH 7.5)

Verified with docker test image rebuild + the same unit-test subset:
all green, urllib3 2.6.3 confirmed installed.
tornado: 6.4.1 -> 6.5.5 fixes:
- CVE-2025-47287 (HIGH 7.5)
- CVE-2026-31958 (HIGH 7.5)
- CVE-2024-52804 (HIGH 7.5)
- CVE-2026-35536 (HIGH 5.3)

Verified with docker test image rebuild + unit subset all green;
tornado 6.5.5 confirmed installed.
PyJWT: 2.9.0 -> 2.12.0 fixes CVE-2026-32597 (HIGH 7.5).

Verified with docker test image rebuild + unit subset all green;
PyJWT 2.12.0 confirmed installed.
pyasn1: 0.6.0 -> 0.6.3 fixes CVE-2026-30922 (HIGH 7.5).

Verified with docker test image rebuild + unit subset all green.
orjson: 3.10.6 -> 3.11.6 fixes CVE-2025-67221 (HIGH 7.5).

Verified with docker test image rebuild + unit subset all green.
GitPython: 3.1.43 -> 3.1.47 fixes:
- GHSA-rpm5-65cw-6hj4 (HIGH)
- GHSA-x2qx-6953-8485 (HIGH)

Verified with docker test image rebuild + unit subset all green.
python-multipart: 0.0.9 -> 0.0.22 fixes:
- CVE-2024-53981 (HIGH 7.5)
- CVE-2026-24486 (HIGH 7.5)

Verified with docker test image rebuild + unit subset all green.
aiohttp: 3.9.5 -> 3.13.3 fixes CVE-2025-69223 (HIGH 7.5).

Cascades enforced by aiohttp 3.13.3's pins:
- aiohappyeyeballs: 2.3.4 -> 2.5.0 (>=2.5.0 required)
- aiosignal: 1.3.1 -> 1.4.0 (>=1.4.0 required)
- yarl: 1.9.4 -> 1.17.0 (>=1.17.0,<2.0 required)

Verified with docker test image rebuild + unit subset all green.
…2025-65106

langchain-core: 0.3.79 -> 0.3.81 fixes:
- CVE-2025-68664 (CRITICAL 8.2)
- CVE-2025-65106 (HIGH)

Held within 0.3.x patch series — does not bump to 1.x. CVE-2026-34070
(also HIGH) requires langchain-core 1.2+ which is a major bump and
will be addressed in a follow-up PR with langchain-community,
langgraph-checkpoint and the rest of the langchain stack moved
together.

Verified with docker test image rebuild + unit subset all green.
@mdmohsin7

Copy link
Copy Markdown
Member Author

morpheus review — omi#7126

Verdict: Approved ✅

Clean security bump. 10 atomic commits, single file (requirements.txt), 14 version pins. Each commit independently tested with Docker rebuild + 190-test subset.

Checks run

Leaks: N/A — no code changes.

Correctness:

  • All 14 bumps are within the same major version — no major boundary crossings. ✓
  • Cascade pins correct: httpcore 1.0.5→1.0.9 unlocks h11 0.16 (was capped at <0.15). aiohttp 3.13.3 cascade pins (aiohappyeyeballs ≥2.5.0, aiosignal ≥1.4.0, yarl ≥1.17.0) all satisfied. ✓
  • langchain-core held at 0.3.81 (not 1.x) — picks up CRITICAL + HIGH without cascading through the langchain stack. Remaining HIGH (CVE-2026-34070, needs 1.2+) correctly deferred. ✓

Scope:

  • Risky major bumps (cryptography 43→46, pillow 10→12, protobuf 4→5, starlette 0.37→0.40, langgraph-checkpoint 2→3) correctly deferred to follow-up PR. ✓
  • Each commit is independently revertable per the atomic commits rule. ✓

Net: 1 CRITICAL + 16 HIGH closed. No blockers.

@greptile-apps

greptile-apps Bot commented May 2, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates 10 Python packages in backend/requirements.txt to close 1 CRITICAL and 16 HIGH CVEs identified in the deployed backend image. Each bump is atomic and independently revertible, and the PR clearly documents tested cascading pin requirements (e.g., httpcore with h11, and aiohappyeyeballs/aiosignal/yarl with aiohttp).

Confidence Score: 4/5

Safe to merge; the one finding is a P2 maintenance concern that does not affect the current Python 3.11 runtime

All changes are security-motivated version bumps in a single file, the test plan is documented, and no breaking incompatibilities were found for the current Python 3.11 runtime. A P2 observation about multidict not being cascaded with the aiohttp 3.9→3.13 bump keeps the score at 4 rather than 5.

backend/requirements.txt — verify multidict version adequacy for future Python upgrades

Important Files Changed

Filename Overview
backend/requirements.txt 10 dependency bumps to resolve 1 CRITICAL + 16 HIGH CVEs; multidict was not bumped alongside the aiohttp 3.9→3.13 cascade

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    subgraph "Commit 1 – CRITICAL CVE-2025-43859"
        h11["h11 0.14.0 → 0.16.0"]
        httpcore["httpcore 1.0.5 → 1.0.9"]
        httpx["httpx 0.28.0 (unchanged)"]
        h11 --> httpcore --> httpx
    end

    subgraph "Commit 9 – aiohttp cascade"
        aiohttp["aiohttp 3.9.5 → 3.13.3"]
        yarl["yarl 1.9.4 → 1.17.0"]
        aiosignal["aiosignal 1.3.1 → 1.4.0"]
        aiohappy["aiohappyeyeballs 2.3.4 → 2.5.0"]
        multidict["multidict 6.0.5 (NOT bumped) ⚠️"]
        yarl --> aiohttp
        aiosignal --> aiohttp
        aiohappy --> aiohttp
        multidict -. "still 6.0.5" .-> aiohttp
    end

    subgraph "Commit 10 – CRITICAL CVE-2025-68664"
        lc["langchain-core 0.3.79 → 0.3.81"]
        langchain["langchain 0.3.27 (unchanged)"]
        lc_community["langchain-community 0.3.31 (unchanged)"]
        lc --> langchain
        lc --> lc_community
    end

    subgraph "Individual bumps (2–8)"
        urllib3["urllib3 2.2.2 → 2.6.3"]
        tornado["tornado 6.4.1 → 6.5.5"]
        pyjwt["PyJWT 2.9.0 → 2.12.0"]
        pyasn1["pyasn1 0.6.0 → 0.6.3"]
        orjson["orjson 3.10.6 → 3.11.6"]
        gitpython["GitPython 3.1.43 → 3.1.47"]
        pymultipart["python-multipart 0.0.9 → 0.0.22"]
    end
Loading

Comments Outside Diff (1)

  1. backend/requirements.txt, line 120 (link)

    P2 multidict not bumped in the aiohttp cascade

    The PR bumps aiohttp from 3.9.5 → 3.13.3 and cascades yarl, aiosignal, and aiohappyeyeballs, but multidict==6.0.5 was left at the pre-bump version. An open aiohttp issue confirms that Python 3.13 requires multidict>=6.1.0, and the 3.13.x changelog also narrowed some multidict API surface. While the current Python 3.11-slim runtime avoids the hard requirement, this will silently become a blocker if the runtime is upgraded, and the inconsistency makes the cascade incomplete compared to the other bumped transitive peers.

Reviews (1): Last reviewed commit: "Bump langchain-core to 0.3.81 for CRITIC..." | Re-trigger Greptile

@mdmohsin7

Copy link
Copy Markdown
Member Author

Changelog audit — non-trivial bumps in this PR

Per the request to enumerate breaking/removed/deprecated items per upstream changelog (no codebase grep). The other commits in this PR (h11, pyjwt, pyasn1, orjson, gitpython, langchain-core 0.3.79→0.3.81) are patch-level and unaudited — point bug fixes only.


aiohttp 3.9.5 → 3.13.3 (four minors)

Removed

  • 3.11: Python 3.8 support; is_ipv6_address and is_ip4_address helpers
  • 3.11: FlowControlDataQueue replaced with WebSocketDataQueue

Breaking / behavior change

  • 3.11: ClientRequest.connection_key and ClientRequest.request_info are now NamedTuples (touches code that mutates these)
  • 3.11: WebSocket receive_str() / receive_bytes() raise new WSMessageTypeError (was generic TypeError)
  • 3.12: subclasses of BaseConnector.connect must include ceil_timeout parameter
  • 3.12: ClientTimeout.sock_connect default changed from unbounded to 30 seconds
  • 3.12: server keepalive_timeout default extended to ~1 hour; pool changed LIFO → FIFO
  • 3.13: brotli/brotlicffi minimum bumped to 1.2; new 32 MiB max output per decompression call
  • 3.13.4+: duplicate singleton headers (Host, Content-Type, Content-Length) now rejected by C parser; RFC 9110 control-character validation tightened

Cascade pins (forced by aiohttp 3.13)

  • aiohappyeyeballs >=2.5.0 (was 2.3.4)
  • aiosignal >=1.4.0 (was 1.3.1)
  • yarl >=1.17.0,<2 (was 1.9.4)

Verdict: NEEDS REVIEW — the new 30s sock_connect default is the most likely silent change (long-tail upstream calls that took >30s to connect would now fail). Decompression cap matters if any endpoint streams large gzip/brotli responses. Custom BaseConnector subclasses need the new ceil_timeout param.


python-multipart 0.0.9 → 0.0.22 (pre-1.0, 13 patch jumps)

Behavior change

  • 0.0.22: filename in File now strips directory path (browsers sometimes send C:\path\file.ext; that prefix is now removed)

Removed

  • 0.0.10–0.0.18: API surface progressively cleaned up; this is the era when the package was reorganized (the underscore-vs-dash naming, python_multipart import path)

Verdict: MODERATE — confirm fastapi (or our routes) do not import from the old module name path. fastapi >=0.112 uses the new python_multipart path so this should be fine.


urllib3 2.2.2 → 2.6.3 (four minors)

Behavior change

  • 2.3: TLS handshake now sets SNI on connections (was previously skipped in some retry paths)
  • 2.4: stricter Retry-After header parsing
  • 2.5: more aggressive connection-pool reuse for HTTP/2

Verdict: LOW RISK — minor jumps within urllib3 2.x. None of the changes target public Python API.


tornado 6.4.1 → 6.5.5

Breaking-ish

  • 6.5: IOLoop cleanup tightened (custom IOLoop subclasses may need close() updates)
  • 6.5: dropped Python 3.8 support
  • 6.5: Mac/Linux add_reader now noisier on bad fds

Verdict: LOW RISK — primary use of tornado in fastapi-based stacks is via streamlit (ops-only here) and as a streaming compat layer.


h11 0.14.0 → 0.16.0 + httpcore 1.0.5 → 1.0.9

Breaking

  • h11 0.16: chunked-encoding leniency removed (the CVE fix)

Verdict: LOW RISK — used by httpcore/httpx; httpcore was bumped in lockstep.


Summary

Package Verdict
aiohttp 3.9→3.13 NEEDS REVIEW (sock_connect 30s default; decompression cap; custom connector subclasses)
python-multipart 0.0.9→0.0.22 MODERATE (module path reorganized over the range)
urllib3 2.2→2.6 LOW
tornado 6.4→6.5 LOW
h11+httpcore LOW
Others (pyjwt, pyasn1, orjson, gitpython, langchain-core 0.3.81) LOW (patch-level)

The two flagged items are aiohttp's 30s sock_connect default and python-multipart's module-path history. Easy spot-check on review; happy to grep for confirmation if morpheus wants.

@mdmohsin7

Copy link
Copy Markdown
Member Author

Codebase grep audit — follow-up to the changelog audit

Did the actual grep for the two items I'd flagged.

aiohttp 3.9→3.13 — CLEAR

Check Result
import aiohttp / from aiohttp anywhere in backend 0 hits — aiohttp is purely transitive (used internally by openai, langchain, posthog SDKs, etc.)
BaseConnector / TCPConnector subclasses 0 hits
ClientTimeout / sock_connect overrides 0 hits
connection_key / request_info access 0 hits
Direct brotli/aiohttp decompression 0 hits — only zlib.decompress (stdlib) in database/conversations.py, not affected by the 32 MiB aiohttp cap

The new 30s sock_connect default + 32 MiB decompression cap don't touch our code path. The internal SDKs that use aiohttp will pick up the changes within their own configurations.

python-multipart 0.0.9→0.0.22 — CLEAR

Check Result
from multipart / import multipart direct usage 1 hit (routers/chat.py:14: from multipart.multipart import shutil — odd pattern, looks like a mistyped import shutil, but importing stdlib shutil indirectly through the multipart submodule's top-of-file import shutil). Verified this still resolves on python-multipart 0.0.22 — from multipart.multipart import shutil returns the stdlib shutil module unchanged
python_multipart (new name) imports 0 hits — no migration needed

Other commits (h11, urllib3, tornado, pyjwt, pyasn1, orjson, gitpython, langchain-core 0.3.81)

Patch-level fixes — no API surface change beyond the security patches themselves. No grep needed.


Net for this PR

Both flagged items came back CLEAR — no code changes required. The PR is good to land as-is from a behavior-compat standpoint.

@mdmohsin7
mdmohsin7 merged commit 547559c into main May 2, 2026
3 checks passed
@mdmohsin7
mdmohsin7 deleted the charles/fix-backend-python-vulns branch May 2, 2026 13:23
mdmohsin7 added a commit that referenced this pull request May 2, 2026
…#7127)

## Summary

5 atomic commits, each a major (or multi-major) bump of a backend Python
dep that closes Artifact Registry HIGH CVEs against the deployed image
(`gcr.io/based-hardware/backend@sha256:a0ef24d4…`). Built and tested
behind PR #7126 (the safe-bumps PR); this PR is the major-version
cascade work split out as requested.

| Commit | Package | Was → Now | CVEs (sev) | Cascades |
|---|---|---|---|---|
| 1 | cryptography | 43.0.0→46.0.5 | CVE-2026-26007 (HIGH 6.5) | cffi
1.16→2.0 |
| 2 | pillow | 10.4.0→12.2.0 | CVE-2026-25990, CVE-2026-40192 (2× HIGH)
| streamlit 1.37→1.51, altair 5.4→5.5, narwhals 1.5→1.14 |
| 3 | protobuf | 4.25.8→5.29.6 | CVE-2026-0994 (HIGH 7.5) |
grpcio/grpcio-status/grpcio-tools 1.62→1.66, google-cloud-firestore
2.17→2.20 |
| 4 | fastapi + starlette | 0.112→0.118 / 0.37→0.40 | CVE-2024-47874
(HIGH 7.5) | fastapi cap forced the cascade |
| 5 | jaraco.context + wheel | (transitive) → 6.1.0 / 0.46.2 |
CVE-2026-23949 (HIGH 8.6), CVE-2024-24049 (HIGH 5.5) | pinned in
requirements.txt to force into venv |

**Net:** 7 HIGH CVEs closed in this PR.

## Cascade summary

| Cascade | Reason |
|---|---|
| cffi 1.16 → 2.0 | cryptography 46 requires cffi >=2.0 |
| streamlit 1.37 → 1.51 | streamlit 1.37 pinned pillow<11; 1.51 is the
lowest version that allows pillow 12 without forcing a further
cachetools >=5.5 jump |
| altair 5.4 → 5.5 | streamlit 1.51 excludes altair 5.4.0/5.4.1 |
| narwhals 1.5 → 1.14 | altair 5.5 requires narwhals >=1.14.2 |
| grpcio* 1.62 → 1.66 | grpcio-tools 1.62 hard-pinned protobuf<5 |
| google-cloud-firestore 2.17 → 2.20 | 2.17 pinned protobuf<5; 2.18+
accepts 5 |
| fastapi 0.112 → 0.118 | fastapi 0.112 pinned starlette<0.38; 0.118
accepts >=0.40 |

All cascade bumps held to the minimum version that resolves the conflict
— no opportunistic-latest moves.

## Deferred

The langchain ecosystem (langchain-core 0.3 → 1.x + langgraph-checkpoint
2 → 3) is going into its own follow-up PR. Those bumps require API
migration in `backend/utils/llm/` and `backend/utils/retrieval/` — too
invasive to bundle here.

## Test plan

For each commit:
1. Update `requirements.txt`
2. Rebuild a local `Dockerfile.test` (Python 3.11-slim, requirements.txt
minus the source-built `lc3py`) — only the pip install layer rebuilds
3. Run a baseline-green subset of unit tests (190 tests across 11 files;
same subset as PR #7126)
4. Confirm bumped package versions installed correctly

All 5 commits individually green. Each cascade was discovered by
attempting the headline bump, reading the resolver error, and pinning
the smallest version that resolves it.

## Verifying after deploy

- [ ] Re-scan rebuilt image; expect the 7 listed CVEs to clear (16 total
cleared once PR #7126 also lands).
- [ ] Smoke `/health`, an auth route, and an LLM-powered route to
surface any runtime API regressions in fastapi/starlette/grpc.
mdmohsin7 added a commit that referenced this pull request May 3, 2026
)

## Summary

15 atomic commits, one per package family, closing the Python-only
MEDIUM CVEs flagged by the Artifact Registry scan on the deployed
backend image (`gcr.io/based-hardware/backend@sha256:348e17d6…`,
revision `backend-00984-2nf`). One bump (starlette) also closes a HIGH
CVE that surfaced after #7126/#7127 merged.

| Commit | Package | Was → Now | CVEs (sev) |
|---|---|---|---|
| 1 | cryptography | 46.0.5 → 46.0.7 | CVE-2026-39892 (MEDIUM, CVSS 9.8)
|
| 2 | Jinja2 | 3.1.4 → 3.1.6 | CVE-2024-56201, CVE-2024-56326,
CVE-2025-27516 (3× MEDIUM, sandbox escapes) |
| 3 | aiohttp | 3.13.3 → 3.13.4 | CVE-2026-22815, CVE-2026-34515,
CVE-2026-34516, CVE-2026-34525 (4× MEDIUM) + CVE-2026-34520 + 5× LOW |
| 4 | fonttools | 4.53.1 → 4.60.2 | CVE-2025-66034 (MEDIUM, CVSS 9.8) |
| 5 | Mako | 1.3.5 → 1.3.11 | CVE-2026-41205 (MEDIUM 7.5) |
| 6 | requests | ~=2.32.5 → ~=2.33.0 | CVE-2026-25645 (MEDIUM 5.5) |
| 7 | python-dotenv | 1.0.1 → 1.2.2 | CVE-2026-28684 (MEDIUM 6.6) |
| 8 | filelock | 3.15.4 → 3.20.3 | CVE-2025-68146, CVE-2026-22701 (2×
MEDIUM) |
| 9 | marshmallow | 3.21.3 → 3.26.2 | CVE-2025-68480 (MEDIUM 5.3) |
| 10 | python-multipart | 0.0.22 → 0.0.26 | CVE-2026-40347 (MEDIUM 5.3)
|
| 11 | streamlit (+ cachetools 5.4 → 5.5) | 1.51.0 → 1.54.0 |
CVE-2026-33682 (MEDIUM 4.8) |
| 12 | h2 (+ hyperframe 6.0.1 → 6.1.0, hpack 4.0.0 → 4.1.0) | 4.1.0 →
4.3.0 | CVE-2025-57804 (MEDIUM) |
| 13 | langchain-core | 0.3.81 → 0.3.84 | CVE-2026-40087 (MEDIUM 5.3,
patch only — does not pull 1.x major) |
| 14 | langsmith | 0.4.37 → 0.7.31 | CVE-2026-25528, CVE-2026-41182 (2×
MEDIUM) |
| 15 | starlette (+ fastapi 0.118 → 0.121) | 0.40.0 → 0.49.1 |
CVE-2025-62727 (HIGH 7.5) + CVE-2025-54121 (MEDIUM 5.3) |

**Net:** 17 MEDIUM + 1 HIGH + 6 LOW CVEs closed, all atomic /
independently revertible.

## Cascade summary

| Cascade | Reason |
|---|---|
| cachetools 5.4 → 5.5 | streamlit 1.54 requires cachetools >=5.5,<7 |
| hyperframe 6.0.1 → 6.1.0 | h2 4.3 requires hyperframe >=6.1 |
| hpack 4.0.0 → 4.1.0 | h2 4.3 requires hpack >=4.1 |
| fastapi 0.118 → 0.121 | fastapi 0.118 caps starlette <0.49; 0.121 is
the smallest version that allows starlette 0.49 |

All cascade bumps held to the minimum version that resolves the
conflict.

## Notes on starlette + main.py

starlette 0.40 (introduced in #7127) shipped a default 1 MB cap per
multipart form part. The startup-time `MultiPartParser.max_part_size =
200 MB` patch in `backend/main.py` continues to work in starlette 0.49 —
verified via import + override + FastAPI app instantiation smoke test.
Per-route caps (tracked in #7130) become available now that we're past
starlette 0.45.

## Deferred

The langchain ecosystem majors (langgraph 0.6 → 1.x,
langgraph-checkpoint 2 → 4, langchain-text-splitters 0.3 → 1.x) remain
parked for a separate PR. Those bumps require API migration in
`backend/utils/llm/` and `backend/utils/retrieval/`.

## Test plan

For each commit:
1. Update `requirements.txt`
2. Rebuild local `Dockerfile.test` (Python 3.11-slim, requirements.txt
minus the source-built `lc3py`) — only the pip install layer rebuilds
3. Run a baseline-green subset of unit tests (190 tests across 11 files;
same subset as #7126/#7127)
4. Confirm bumped package version installed correctly

All 15 commits individually green. Cascade bumps were discovered by
attempting the headline bump, reading the resolver error, and pinning
the smallest version that resolves it.

## Verifying after deploy

- [ ] Re-scan rebuilt image; expect the listed CVEs to clear.
- [ ] Smoke `/health`, an auth route, and a multipart upload route
(voice-message or persona thumbnail) to confirm the starlette/fastapi
bump didn't regress request handling.
mdmohsin7 added a commit that referenced this pull request May 3, 2026
## Summary

2 atomic commits closing the deferred langchain-stack CVEs from the
Artifact Registry scan on
`gcr.io/based-hardware/backend@sha256:348e17d6…`. langchain ecosystem
moves from the 0.3.x line to 1.x as one resolver-satisfiable set; tight
inter-package pins (e.g. `langgraph-prebuilt 1.0.8` requires
`langchain-core>=1.0.0`, `langchain-text-splitters 1.1.2` requires
`langchain-core>=1.2.31`) make a partial bump impossible.

| Commit | Scope | CVEs |
|---|---|---|
| 1 | Refactor `utils/llm/persona.py` — single deprecated `from
langchain.schema` import → `from langchain_core.messages` (no-op under
0.3.x; required for 1.x where `langchain.schema` is removed) | — |
| 2 | langchain ecosystem 0.3 → 1.x (11 packages) + 4 cascade pins | 2
HIGH + 3 MEDIUM |

**Closed:**

| Package | Was → Now | CVE | Severity |
|---|---|---|---|
| langchain-core | 0.3.84 → 1.3.2 | CVE-2026-34070 | HIGH 7.5 |
| langgraph-checkpoint | 2.1.2 → 4.0.0 | CVE-2025-64439 | HIGH |
| langgraph | 0.6.10 → 1.0.10 | CVE-2026-28277 | MEDIUM 7.2 |
| langgraph-checkpoint | 2.1.2 → 4.0.0 | CVE-2026-27794 | MEDIUM 6.6
(covered by same bump) |
| langchain-text-splitters | 0.3.11 → 1.1.2 | CVE-2026-41481 | MEDIUM
6.5 |

## Locked-in cascade (langchain stack)

| Package | Was → Now | Reason |
|---|---|---|
| langchain | 0.3.27 → 1.2.9 | locked to langchain-core 1.x |
| langchain-community | 0.3.31 → 0.4.1 | locked to langchain-core 1.x |
| langchain-openai | 0.3.35 → 1.1.9 | locked; held below 1.1.10 to defer
the openai 2.x cascade |
| langchain-google-genai | 2.1.12 → 3.2.0 | locked to langchain-core 1.x
(3.x is the 1.x-compatible series) |
| langchain-pinecone | 0.2.12 → 0.2.13 | 0.2.13 opens its langchain-core
cap to 1.x |
| langgraph-prebuilt | (transitive 0.6.5) → 1.0.8 (new explicit pin) |
required by langgraph 1.0 |
| langgraph-sdk | 0.2.9 → 0.3.0 | required by langgraph 1.0 |

## Cascade pins outside the langchain stack

| Package | Was → Now | Reason |
|---|---|---|
| openai | 1.104.2 → 1.109.1 | langchain-openai 1.1.9 requires
openai>=1.109.1; held within 1.x to keep the openai 2.x SDK migration
out of scope |
| pydantic | 2.8.2 → 2.11.10 | langchain-pinecone 0.2.13 requires
pydantic>=2.11.1 |
| pydantic_core | 2.20.1 → 2.33.2 | pydantic 2.11.10 hard-pins
pydantic-core==2.33.2 |
| typing_extensions | 4.12.2 → 4.15.0 | **regression fix** —
langchain-core 1.x uses the TypedDict `extra_items` keyword (added in
typing_extensions 4.13). Without this bump, every `utils/llm/*` and
`utils/retrieval/*` module fails at import with
`_TypedDictMeta.__new__() got an unexpected keyword argument
'extra_items'`. Caught via post-bump module-import smoke test, not the
unit subset |

All cascade bumps held to the smallest version that resolves the
conflict.

## Code change in commit 1

The single deprecated path in our code (`from langchain.schema import
SystemMessage, HumanMessage, AIMessage` in `utils/llm/persona.py:5`)
moves to `from langchain_core.messages import …`. The classes are
identical (verified with `is` comparison): `langchain.schema` has been a
re-export of `langchain_core.messages` since 0.1.x and is removed
entirely in the langchain 1.x line. Doing the migration under the
existing 0.3.x pin keeps the bump commit a pure dep change.

## Out of scope (deferred)

| Package | CVE | Why deferred |
|---|---|---|
| langchain-openai 1.1.9 → 1.1.14 | CVE-2026-41488 | LOW; fix at 1.1.14
requires openai>=2.26.0, which is a major SDK migration. Covered
separately. |
| openai 1.109.1 → 2.x | (no CVE itself) | Belongs with the
langchain-openai 1.1.14 bump above |

## Test plan

For the bump commit:
1. Update `requirements.txt` (15 pinned + 1 new pin)
2. Rebuild local `Dockerfile.test` (Python 3.11-slim, requirements.txt
minus the source-built `lc3py`) — only the pip install layer rebuilds
3. Run baseline 190-test subset (same 11 files used in
#7126/#7127/#7146)
4. **Additional:** smoke-import every module under `utils/llm/`,
`utils/retrieval/`, `utils/observability/` that imports any langchain-*
package (28 modules) — catches API/typing regressions that the baseline
subset doesn't exercise

All commits individually green:
- 190-test baseline subset all pass
- 28 langchain-using modules all import cleanly (only
`DefaultCredentialsError` on modules that touch GCP at import time,
expected in test env without service account)

## Verifying after deploy

- [ ] Re-scan rebuilt image; expect the listed CVEs to clear.
- [ ] Smoke `/health`, an LLM-powered route (chat or memory generation),
and a retrieval-tool route (calendar or memory search) to confirm the
langchain 1.x runtime APIs behave correctly under real LLM traffic.
mdmohsin7 added a commit that referenced this pull request May 5, 2026
First of four service-sync PRs propagating the security bumps from
backend (#7126, #7127, #7146, #7149) to the sub-services that don't
auto-inherit `backend/requirements.txt`.

## What this PR does

Two atomic commits:

| Package | Before | After | Why |
|---|---|---|---|
| `fastapi` | `0.115.0` | `0.121.0` | matches backend's pin from #7146 |
| `cryptography` | unpinned | `46.0.7` | matches backend's pin from
#7146 |

`uvicorn[standard]` is already at `0.30.6` (one patch ahead of backend's
`0.30.5`), left alone. Everything else (`uvloop`, `websockets`,
`firebase-admin`, `httpx`, `google-auth`) already matches backend.

## CVEs closed

| CVE | Severity | Package | Fix at |
|---|---|---|---|
| CVE-2024-47874 | HIGH 7.5 | starlette (transitive of fastapi) |
starlette 0.40 — fastapi 0.118 caps |
| CVE-2025-62727 | HIGH 7.5 | starlette (transitive of fastapi) |
starlette 0.49 — fastapi 0.121 caps |
| CVE-2026-39892 | MEDIUM (CVSS 9.8) | cryptography | 46.0.7 |
| CVE-2026-26007 | HIGH 6.5 | cryptography | 46.0.5 (also covered by the
46.0.7 pin) |

## Test plan

End-to-end smoke test in a clean Python 3.12 venv with the
mohsins-agents service account exported via
`GOOGLE_APPLICATION_CREDENTIALS`:

- [x] `pip install -r requirements.txt` clean; `pip check` reports no
broken dependencies
- [x] Resolved versions match: `fastapi 0.121.0`, `starlette 0.49.3`,
`cryptography 46.0.7`, `uvicorn 0.30.6`, `httpx 0.28.0`
- [x] All `main.py` top-level imports resolve (firebase_admin, fastapi,
AESGCM + HKDF from cryptography.hazmat, websockets,
google.cloud.firestore_v1, etc.)
- [x] `uvicorn main:app --loop uvloop` boots clean: `Application startup
complete`, zero warnings
- [x] `GET /health` returns 200 `{"status":"ok"}`
- [x] `GET /openapi.json` returns 200, schema is OpenAPI 3.1.0 (fastapi
0.121's output)
- [x] `GET /v1/agent/ws` (over HTTP) returns 404 — correct, it's a
WebSocket-only endpoint
- [x] `WS /v1/agent/ws` without `Authorization: Bearer` header is
rejected with HTTP 403; log shows `WS rejected: missing Authorization
header` — auth code path executes correctly under starlette 0.49.3
- [x] Clean shutdown
- [ ] Confirm post-deploy Artifact Registry rescan shows the 4 CVEs
cleared on the agent-proxy image

## Follow-ups in this series

- pusher (`backend/pusher/`) — 57 shared packages with backend
- diarizer (`backend/diarizer/`) — 57 shared packages
- plugins (`plugins/`) — 110 shared packages, biggest fan-out

vad (`backend/modal/`) and notifications-job already auto-inherit
`backend/requirements.txt` via `-r ../requirements.txt`, so they're not
in this series.
mdmohsin7 added a commit that referenced this pull request May 5, 2026
)

Second of four service-sync PRs propagating backend's #7126 + #7127 +
#7146 + #7149 bumps to the sub-services that don't auto-inherit
`backend/requirements.txt`. Follows #7173 (agent-proxy).

## What this PR does

10 atomic commits, one per package family. 20 pins lifted to match
backend.

| # | Commit | Package(s) | Was → Now |
|---|---|---|---|
| 1 | orjson | orjson | 3.10.6 → 3.11.6 |
| 2 | python-multipart | python-multipart | 0.0.9 → 0.0.26 |
| 3 | python-dotenv | python-dotenv | 1.0.1 → 1.2.2 |
| 4 | requests | requests | ~=2.32.5 → ~=2.33.0 |
| 5 | cryptography | cryptography | 43.0.0 → 46.0.7 |
| 6 | google-cloud-firestore | google-cloud-firestore | 2.17.0 → 2.20.0
|
| 7 | fastapi+starlette | fastapi / starlette | 0.112.0 / 0.37.2 →
0.121.0 / 0.49.1 |
| 8 | pydantic+pydantic_core | pydantic / pydantic_core | 2.8.2 / 2.20.1
→ 2.11.10 / 2.33.2 |
| 9 | openai | openai | 1.104.2 → 1.109.1 |
| 10 | langchain stack | langchain / langchain-community /
langchain-core / langchain-google-genai / langchain-openai /
langchain-pinecone / langchain-text-splitters / langgraph / langsmith |
0.3.x → 1.x cascade |

## CVEs closed

Mirroring backend's PRs:

- **From #7126 (safe bumps):** HIGH 7.5 CVE-2025-67221 (orjson), HIGH
7.5 CVE-2024-53981 + CVE-2026-24486 (python-multipart)
- **From #7127 (cascades):** HIGH 7.5 CVE-2024-47874 (starlette via
fastapi), HIGH 6.5 CVE-2026-26007 (cryptography)
- **From #7146 (Python MEDIUMs + 1 HIGH):** HIGH 7.5 CVE-2025-62727
(starlette via fastapi), MEDIUM 5.3 CVE-2025-54121 (starlette), MEDIUM
(CVSS 9.8) CVE-2026-39892 (cryptography), MEDIUM 7.5 CVE-2026-40347
(python-multipart), MEDIUM 6.6 CVE-2026-28684 (python-dotenv), MEDIUM
5.5 CVE-2026-25645 (requests)
- **From #7149 (langchain 1.x cascade):** HIGH 7.5 CVE-2026-34070
(langchain-core), HIGH 0 CVE-2025-64439 (langgraph-checkpoint,
transitive of langgraph 1.x), CRITICAL 8.2 CVE-2025-68664 + HIGH
CVE-2025-65106 (langchain-core), MEDIUM 7.2 CVE-2026-28277 (langgraph),
MEDIUM 6.6 CVE-2026-27794 (langgraph-checkpoint, transitive), MEDIUM 6.5
CVE-2026-41481 (langchain-text-splitters), MEDIUM 5.3 CVE-2026-40087
(langchain-core), 2× MEDIUM CVE-2026-25528 + CVE-2026-41182 (langsmith)

## Why no shared-code changes

Pusher's Dockerfile COPYs `backend/utils/`, `backend/routers/`,
`backend/database/`, `backend/models/`. Those modules were already
migrated to the langchain 1.x import paths in #7149 (e.g.
`backend/utils/llm/persona.py` uses `from langchain_core.messages`
instead of the removed `from langchain.schema`). Greped all four
directories for any stale `langchain.schema` / `langchain.chat_models` /
`langchain.tools` / `langchain.runnables` imports — none found. No code
change needed in pusher itself.

`langgraph-checkpoint`, `langgraph-prebuilt`, `langgraph-sdk`, and
`typing_extensions` are left unpinned in pusher and resolve transitively
through `langchain-core 1.3.2` and `langgraph 1.0.10`. Verified the
resolver picks `typing_extensions==4.15.0` (matches backend's explicit
pin).

## Test plan

End-to-end smoke test in a Python 3.12 venv, with all 16 prod secrets
pulled from GSM (sourced + shredded — no values left on disk):

- [x] `pip install -r requirements.txt` clean (lc3py built locally from
the same liblc3 upstream the Dockerfile uses); `pip check` reports no
broken deps
- [x] All 21 bumped packages resolve to the expected pins;
`typing_extensions==4.15.0` auto-resolved
- [x] `langchain_core` 1.x imports verified (the full set used in shared
`utils/llm/`, `utils/retrieval/`, `utils/observability/`):
`SystemMessage` / `HumanMessage` / `AIMessage` / `ChatPromptTemplate` /
`RunnableConfig` / `tool` / `StructuredTool` / `PydanticOutputParser` /
`BaseCallbackHandler` / `LLMResult` / `LangChainTracer` /
`BaseChatModel` — all import clean
- [x] fastapi 0.121 + pydantic 2.11 + starlette 0.49 interop verified
(FastAPI app + pydantic v2 BaseModel + validation round-trip)
- [x] cryptography 46.0.7 AESGCM + HKDF round-trip works (the primitives
`pusher`'s encryption code uses)
- [x] **Full `uvicorn pusher.main:app` boot** with prod env
(PINECONE/REDIS/OPENAI/FAL/GROQ/DEEPGRAM/STRIPE/TYPESENSE/LANGCHAIN/ENCRYPTION/etc.):
- `utils/llm/clients.py` module-loads **all 35 QoS LLM clients**
(gpt-5.4-mini, gpt-4.1-mini/nano, gemini-2.5-flash-lite,
claude-sonnet-4-6, sonar-pro, openrouter) without errors under
langchain-core 1.3.2 + langchain-openai 1.1.9 + langchain-google-genai
3.2.0 + langchain-anthropic
  - BYOK QoS profile loads
- `Started server process` + `Application startup complete` — zero
errors, zero warnings
  - `GET /health` → 200 `{"status":"healthy"}`
  - `GET /metrics` → 401 (auth-required, correct)
- `GET /openapi.json` → 200, schema is OpenAPI 3.1.0 (fastapi 0.121's
output)
  - Clean shutdown
- [ ] Confirm post-deploy Artifact Registry rescan shows the targeted
CVEs cleared on the pusher GKE image

## Follow-ups in this series

- diarizer (`backend/diarizer/`) — 57 shared packages with backend
- plugins (`plugins/`) — 110 shared packages, biggest fan-out

vad (`backend/modal/`) and notifications-job already auto-inherit
`backend/requirements.txt` via `-r ../requirements.txt`.
pull Bot pushed a commit to codingwatching/omi that referenced this pull request May 5, 2026
Closes 1 HIGH CVE in the pusher service, matching backend's BasedHardware#7126
pin:
- HIGH 7.5 CVE-2025-67221
pull Bot pushed a commit to codingwatching/omi that referenced this pull request May 5, 2026
Closes 3 CVEs in pusher, matching backend's pin progression in
BasedHardware#7126 (0.0.9 → 0.0.22) and BasedHardware#7146 (0.0.22 → 0.0.26):
- HIGH 7.5 CVE-2024-53981
- HIGH 7.5 CVE-2026-24486
- MEDIUM 5.3 CVE-2026-40347
pull Bot pushed a commit to codingwatching/omi that referenced this pull request May 5, 2026
Closes the langchain-stack CVEs in pusher, matching backend's BasedHardware#7149
pin set (which also covers the earlier BasedHardware#7126 + BasedHardware#7146 langchain-core
patch bumps):

- HIGH 7.5 CVE-2026-34070 (langchain-core)
- HIGH 0 CVE-2025-64439 (langgraph-checkpoint, transitive of langgraph 1.x)
- HIGH 0 CRITICAL 8.2 CVE-2025-68664 (langchain-core)
- MEDIUM 7.2 CVE-2026-28277 (langgraph)
- MEDIUM 6.6 CVE-2026-27794 (langgraph-checkpoint, transitive)
- MEDIUM 6.5 CVE-2026-41481 (langchain-text-splitters)
- MEDIUM 5.3 CVE-2026-40087 (langchain-core)
- 2× MEDIUM CVE-2026-25528 + CVE-2026-41182 (langsmith)

The whole stack moves together because the major-version range
caps lock-step (langchain 1.x requires langchain-core 1.x; langgraph
1.x requires langgraph-checkpoint 4.x via transitive; langchain-openai
1.x requires langchain-core 1.x).

Code paths in backend/utils/llm/ that pusher imports via Dockerfile
COPY (utils/, routers/, database/, models/) were already migrated
to the langchain 1.x import paths in BasedHardware#7149 (e.g. persona.py uses
langchain_core.messages instead of langchain.schema). No additional
code change needed in pusher itself.

langgraph-checkpoint, langgraph-prebuilt, langgraph-sdk and the
typing_extensions 4.13+ floor are left unpinned — pulled in
transitively by langgraph 1.0.10 and langchain-core 1.3.2 at install.
Verified the resolver picks typing_extensions 4.15.0 (matches
backend's explicit pin).
mdmohsin7 added a commit that referenced this pull request May 5, 2026
Third of four service-sync PRs propagating backend's #7126 + #7127 +
#7146 + #7149 bumps to the sub-services that don't auto-inherit
`backend/requirements.txt`. Follows #7173 (agent-proxy) and #7177
(pusher).

## What this PR does

8 atomic commits, 10 pins lifted to match backend. Diarizer doesn't use
langchain so no major-cascade work — much smaller than pusher.

| # | Commit | Package(s) | Was → Now |
|---|---|---|---|
| 1 | aiohttp | aiohttp | 3.13.2 → 3.13.4 |
| 2 | python-multipart | python-multipart | 0.0.21 → 0.0.26 |
| 3 | requests | requests | 2.32.5 → ~=2.33.0 |
| 4 | filelock | filelock | 3.20.1 → 3.20.3 |
| 5 | mako | mako | 1.3.10 → 1.3.11 |
| 6 | pillow | pillow | 12.0.0 → 12.2.0 |
| 7 | fastapi+starlette | fastapi / starlette | 0.112.0 / 0.37.2 →
0.121.0 / 0.49.1 |
| 8 | pydantic+pydantic-core | pydantic / pydantic-core | 2.8.2 / 2.20.1
→ 2.11.10 / 2.33.2 |

Diarizer was already mostly aligned with backend after #7157 (the recent
base-image bump). The other 47 shared packages either match exactly or
are AHEAD of backend (e.g. `aiohappyeyeballs 2.6.1 > 2.5.0`, `anyio
4.12.0 > 4.4.0`, `numpy 2.4.0 > 1.26.4`, `protobuf 6.33.2 > 5.29.6`) —
those were left untouched. Never downgrade.

## CVEs closed (~14)

- **From #7126 / #7146 (aiohttp 3.13.x rollup):** 4× MEDIUM
CVE-2026-22815 / -34515 / -34516 / -34525 + 6× LOW (CVE-2026-34520 et
al.)
- **From #7127 + #7146 (fastapi/starlette):** HIGH 7.5 CVE-2024-47874,
HIGH 7.5 CVE-2025-62727, MEDIUM 5.3 CVE-2025-54121
- **From #7146 (Python MEDIUMs):** MEDIUM CVE-2025-68146 +
CVE-2026-22701 (filelock), MEDIUM 7.5 CVE-2026-41205 (mako), MEDIUM 5.3
CVE-2026-40347 (python-multipart), MEDIUM 5.5 CVE-2026-25645 (requests)
- **From #7127 (pillow cascade):** HIGH 7.5 CVE-2026-25990, HIGH 7.5
CVE-2026-40192

## Test plan

End-to-end smoke test in a Python 3.12 venv (local platform: ARM64;
diarizer's runtime target is amd64+CUDA):

- [x] `pip install` of all bumped packages clean; `pip check` reports no
broken deps
- [x] All 12 bumped packages resolve to expected pins;
`typing_extensions==4.15.0` auto-resolved
- [x] **Full `uvicorn main:app` boot** with `diarization` and
`embedding` modules stubbed (pyannote-audio's transitive
`torchcodec==0.7.0` is amd64-only — pre-existing platform pin, not
affected by these bumps):
- `Started server process` + `Application startup complete` — zero
errors, zero warnings
  - `GET /health` → 200 `{"status":"healthy"}`
- `POST /v1/diarization` with multipart file upload → 200 (exercises
`starlette 0.49.1` + `python-multipart 0.0.26` upload hot path under
`fastapi 0.121`)
  - `POST /v2/embedding` with multipart upload → 200
- `GET /openapi.json` → 200, schema is OpenAPI 3.1.0 (fastapi 0.121's
output)
  - All four endpoints registered with proper signatures
  - Clean shutdown
- [x] `pydantic 2.11.10` + `fastapi 0.121.0` + `starlette 0.49.1`
interop verified (built diarizer-shape app, instantiated `BaseModel`,
validation round-trip)
- [ ] Confirm post-deploy Artifact Registry rescan shows the targeted
CVEs cleared on the diarizer GKE image

### On `pydantic 2.11` + `torch` / `lightning` / `pyannote-audio`
interop

Can't fully exercise locally because `pyannote-audio 4.0.3` requires
`torchcodec==0.7.0` which is amd64-only (only `0.0.0.dev0` / `0.11.x`
are available on Python 3.12 + aarch64). This is a pre-existing platform
constraint, not affected by my bumps.

The combination is implicitly proven by backend's #7149
(`pydantic==2.11.10` running in prod since this morning) and
`backend/modal` (which combines `torch` + `lightning` + `pyannote-audio`
+ `pydantic 2.11` — already inherits backend's `requirements.txt` via
`-r ../requirements.txt` and is running in prod on modal today).

## Follow-ups in this series

- plugins (`plugins/`) — 110 shared packages, biggest fan-out

vad (`backend/modal/`) and notifications-job already auto-inherit
`backend/requirements.txt` via `-r ../requirements.txt`.
mdmohsin7 added a commit that referenced this pull request May 6, 2026
… deps (#7179)

Last of four service-sync PRs propagating backend's #7126 + #7127 +
#7146 + #7149 bumps to the sub-services that don't auto-inherit
`backend/requirements.txt`. Follows #7173 (agent-proxy), #7177 (pusher)
and #7178 (diarizer).

Plugins is the biggest fan-out in the series — 110 shared packages with
backend, 47 differing pins, plus a real langchain code migration
(langchain-core 1.x removed the `pydantic_v1` shim).

## What this PR does

23 atomic commits, organized to mirror backend's PR series.

### 1. Code migration (1 commit)

Forward-compatible: `plugins/_multion/router.py` and
`plugins/advanced/realtime.py` migrate from `langchain_core.pydantic_v1`
(removed in langchain-core 1.0) to `pydantic` v2 directly. Field
signatures: `min_items=0` → `min_length=0` (the v2 equivalent for List
constraints).

`_multion/router.py` is imported by `main.py` and registered as a router
→ would crash uvicorn at import time on langchain-core 1.x without this
fix. `advanced/realtime.py` is the deprecated REALTIME plugins module
that `main.py` explicitly disables, but fixed for cleanliness.

### 2. Security pin bumps (mirrors backend, 18 commits)

Same pattern as #7177 (pusher), reorganized into per-package-family
commits:

- orjson, python-multipart, python-dotenv, requests, jinja2,
marshmallow, tornado, urllib3
- cryptography (+ cffi cascade)
- aiohttp ecosystem (aiohttp + aiosignal + yarl)
- h11 + httpcore (must move together)
- h2 + hpack + hyperframe (must move together)
- protobuf + grpcio + grpcio-tools (cascade)
- fastapi + starlette + fastapi-cli (cascade)
- pydantic + pydantic-core + pydantic-settings (must move together)
- openai
- langchain stack 0.2 → 1.x (langchain, langchain-community,
langchain-core, langchain-openai, langchain-text-splitters, langsmith,
langchain-groq) — note plugins is one major behind pusher's 0.3 → 1.x
- 12 infrastructure pins (attrs, packaging, posthog, prometheus_client,
qdrant-client, redis, SQLAlchemy, tqdm, typing_extensions, uvicorn,
uvloop, httpx) batched as a single non-CVE-closure commit

### 3. Resolver-pressure fixes (4 commits)

Dead deps blocking the security bumps:

| Pkg | Dropped | Why |
|---|---|---|
| **asknews** | 0.7.36 | Hard-caps `cryptography<42.0.7` / latest
0.13.45 still caps `<46.0.7` → blocks CVE-2026-39892 fix |
| **multion** | 1.3.5 | Hard-pins `agentops<0.3.0` → blocks resolver
chain |
| **agentops** | 0.4.21 (after a brief bump from 0.2.6) | 0.2.6
hard-pinned `requests==2.31.0` → blocks requests bump |

All three were unused — verified via repo-wide `grep import multion /
from multion / import agentops / from agentops / from asknews / import
asknews` (zero hits). They've sat in `plugins/requirements.txt` since
the initial move from `plugins/example/` (Feb 2026) and were probably
installed for the deprecated REALTIME plugins. Backend doesn't have them
either, so removing also brings plugins closer to backend.

| Pkg | Bumped | Why |
|---|---|---|
| **groq** | 0.11.0 → 0.37.1 | langchain-groq 1.1.2 raised floor to
`>=0.30.0`. Plugins-specific (backend doesn't pin langchain-groq). |

## CVEs closed (~25)

- **CRITICAL 9.1** CVE-2025-43859 (h11+httpcore — HTTP request
smuggling)
- **CRITICAL 8.2** CVE-2025-68664 (langchain-core)
- **HIGH × 14**: tornado (4× CVEs), urllib3 (3), aiohttp
(CVE-2025-69223), cryptography (CVE-2026-26007), fastapi/starlette
(CVE-2024-47874, CVE-2025-62727 + GHSA-mwv6-3258-q52c — wait that's
next), python-multipart (CVE-2024-53981, CVE-2026-24486), orjson
(CVE-2025-67221), langchain-core (CVE-2026-34070), protobuf
(CVE-2026-0994)
- **MEDIUM × 12+**: jinja2 (3 sandbox-escape CVEs), aiohttp (4),
python-multipart (CVE-2026-40347), requests (CVE-2026-25645),
python-dotenv (CVE-2026-28684), marshmallow (CVE-2025-68480), h2
(CVE-2025-57804), langchain-core (CVE-2026-40087), langsmith (2
MEDIUMs), starlette (CVE-2025-54121), cryptography (CVSS 9.8
CVE-2026-39892)

## Test plan

End-to-end smoke test in a Python 3.12 venv with prod secrets pulled
from GSM (sourced + shredded — no values left on disk):

- [x] `pip install -r requirements.txt` resolves cleanly after the
dead-dep removals; `pip check` reports no broken dependencies
- [x] All 28 spot-checked target packages resolve to expected pins
(`typing_extensions==4.15.0` auto-resolved, `langchain-groq==1.1.2`
matches the new floor, etc.)
- [x] **Full `uvicorn main:app` boot** with prod env (REDIS,
OPENAI_API_KEY_PLUGINS, GROQ, NOTION OAuth, MEM0, HEY_OMI, ZAPIER,
MULTION OAuth):
- `Started server process` + `Application startup complete` — zero
errors, zero warnings
- `iq_rating.main:Database initialized` (SQLAlchemy 2.0.32 + sqlite
layer works)
  - `GET /` → 200 with the API root listing
  - `GET /docs` → 200
- `GET /openapi.json` → 200, schema is OpenAPI 3.1.0 (fastapi 0.121's
output)
- **38 routes registered** across all integrations: chatgpt, multion
(OAuth flow, not the SDK), mentor, iq-rating, notion auth, hey_omi,
zapier, subscription, conversation-feedback
  - Clean shutdown
- [x] **pydantic_v1 → v2 migration verified**: `/multion/...` paths
registered correctly (would have crashed at `_multion/router.py` import
time without the migration, since `langchain_core.pydantic_v1` doesn't
exist in 1.x)
- [x] `pydantic 2.11` + `langchain 1.x` + `ChatGroq` + `ChatOpenAI` +
`langchain-core` + `langgraph` interop verified at module-load
- [ ] Confirm post-deploy Artifact Registry rescan shows the targeted
CVEs cleared on the plugins Cloud Run image

## Series wrap

This is the last service-sync. After merge, the four sub-services that
don't auto-inherit `backend/requirements.txt` (agent-proxy, pusher,
diarizer, plugins) will all be aligned with backend's
#7126/#7127/#7146/#7149 security state. `vad` (`backend/modal/`) and
`notifications-job` (also under modal) auto-inherit and need no separate
work.
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
Closes 1 HIGH CVE matching backend's BasedHardware#7126:
- HIGH 7.5 CVE-2025-67221
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
Closes 3 CVEs matching backend's pin progression in BasedHardware#7126
(0.0.9 → 0.0.22) and BasedHardware#7146 (0.0.22 → 0.0.26):
- HIGH 7.5 CVE-2024-53981
- HIGH 7.5 CVE-2026-24486
- MEDIUM 5.3 CVE-2026-40347
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
Closes 4 CVEs matching backend's BasedHardware#7126:
- HIGH 7.5 CVE-2025-47287
- HIGH 7.5 CVE-2026-31958
- HIGH 7.5 CVE-2024-52804
- HIGH 5.3 CVE-2026-35536
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
Closes 3 HIGH CVEs matching backend's BasedHardware#7126:
- HIGH 7.5 CVE-2025-66471
- HIGH 7.5 CVE-2026-21441
- HIGH 7.5 CVE-2025-66418
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
…yarl)

Closes 5 CVEs matching backend's pin progression in BasedHardware#7126
(aiohttp 3.9.5 → 3.13.3) and BasedHardware#7146 (3.13.3 → 3.13.4):
- HIGH 7.5 CVE-2025-69223
- 4× MEDIUM CVE-2026-22815, CVE-2026-34515, CVE-2026-34516,
  CVE-2026-34525
- LOW (CVSS 9.1) CVE-2026-34520
- 5× LOW

aiosignal and yarl move with aiohttp (aiohttp 3.13.x requires
aiosignal>=1.4 and yarl>=1.17).
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
Closes 1 CRITICAL CVE matching backend's BasedHardware#7126:
- CRITICAL 9.1 CVE-2025-43859 (HTTP request smuggling via
  malformed chunked encoding)

h11 and httpcore must move together (httpcore caps h11 to a
specific minor).
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
Closes the langchain-stack CVEs in plugins, matching backend's
BasedHardware#7149 pin set (which also rolls in the earlier BasedHardware#7126 + BasedHardware#7146
langchain-core patch bumps):

- HIGH 7.5 CVE-2026-34070 (langchain-core)
- CRITICAL 8.2 CVE-2025-68664 + HIGH CVE-2025-65106 (langchain-core)
- HIGH 0 CVE-2025-64439 (langgraph-checkpoint, transitive — but
  plugins doesn't use langgraph directly so this is informational)
- MEDIUM 6.5 CVE-2026-41481 (langchain-text-splitters)
- MEDIUM 5.3 CVE-2026-40087 (langchain-core)
- 2× MEDIUM CVE-2026-25528 + CVE-2026-41182 (langsmith)

Plugins is one MAJOR ahead of pusher's bump (0.2 → 1.x vs pusher
0.3 → 1.x), but the cascade is the same shape. The whole stack
moves together because the major-version range caps lock-step.

langchain-groq is plugins-specific (not in backend's set). Bumped
to 1.1.2 — the first version compatible with langchain-core 1.x.

The pydantic_v1 → pydantic v2 migration in 12d5198 is what
unblocks this commit; `langchain_core.pydantic_v1` is removed in
1.x and would crash uvicorn at `_multion/router.py` import time
without that fix.
pull Bot pushed a commit to Mu-L/omi that referenced this pull request May 6, 2026
12 patch/minor bumps to keep plugins ABI-aligned with backend:
- attrs 23.2.0 → 24.1.0
- httpx 0.25.2 → 0.28.0
- packaging 23.2 → 24.2
- posthog 3.5.0 → 3.5.2
- prometheus_client 0.20.0 → 0.21.1
- qdrant-client 1.10.1 → 1.11.0
- redis 5.0.7 → 5.0.8
- SQLAlchemy 2.0.31 → 2.0.32
- tqdm 4.66.4 → 4.66.5
- typing_extensions 4.12.2 → 4.15.0 (required floor for langchain-core 1.x typed-dict `extra_items` keyword)
- uvicorn 0.30.3 → 0.30.5
- uvloop 0.19.0 → 0.20.0

None of these have a direct CVE in backend's BasedHardware#7126/BasedHardware#7127/BasedHardware#7146/BasedHardware#7149
set. Bumped together because they're all small ABI-consistency moves
with no behavioural risk.
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.

1 participant