Skip to content

ci: pin torch to 2.6.0+cpu (close CVE-2025-32434 gap in CI)#75

Merged
CGFixIT merged 1 commit into
mainfrom
claude/cyclaw-ci-torch-cve-pin
Jun 20, 2026
Merged

ci: pin torch to 2.6.0+cpu (close CVE-2025-32434 gap in CI)#75
CGFixIT merged 1 commit into
mainfrom
claude/cyclaw-ci-torch-cve-pin

Conversation

@CGFixIT

@CGFixIT CGFixIT commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Problem

.github/workflows/ci.yml installs the test environment with:

pip install torch==2.4.1+cpu --index-url https://download.pytorch.org/whl/cpu

But the project's documented security gate requires torch ≥ 2.6.0:

  • pyproject.toml[torch-cpu] / [full]: torch==2.6.0+cpu
    with the comment "Minimum safe version post CVE-2025-32434 (weights_only=True RCE bypass in torch<2.6)."
  • retrieval/embeddings.py security note: "We now pin torch==2.6.0+cpu … CVE-2025-32434 showed that torch.load(..., weights_only=True) was bypassable for RCE on torch<2.6.0."

CI was running its full test + RAG smoke suite against torch 2.4.1, a version below that gate and still exposed to CVE-2025-32434. That means the "reproducible CI security gate" was validating against a different, vulnerable torch than the one shipped to users — and a regression that depends on 2.6.0 behavior could pass or fail inconsistently.

Also, problem 2:

config.yaml → security.allowed_origins contained:

  • “null” #DevSkim: ignore DS162092,DS137138
    The quotes around null are curly/smart quotes (“ ”), not straight quotes. YAML therefore parses this as the literal 6-character string “null” (curly quotes included), which gate.py feeds straight into Starlette's CORSMiddleware allow_origins.

--

Recommendation for problem #2: use straight quotes around null instead of "null"

--

Change

  1. Bump the CI torch install to torch==2.6.0+cpu and add a comment tying it back to the pyproject.toml pin and the CVE.

  2. make relevant changes to requirements.txt and constraints.txt to reflect the prior change, if needed

  3. for problem Bump the pip group across 1 directory with 3 updates #2: use straight quotes around null instead of "null" in config.yaml

Benefit

  • CI now tests against the same hardened torch version the project documents and ships.
  • Closes the CVE-2025-32434 exposure in the CI environment.
  • Removes the silent drift between ci.yml and pyproject.toml.
    -config.yaml null origins allowed will be allowed haha

CI installed torch==2.4.1+cpu, which is below the 2.6.0 minimum
documented in pyproject.toml ([torch-cpu]) and retrieval/embeddings.py.
torch<2.6.0 is vulnerable to CVE-2025-32434 (the weights_only=True
RCE bypass). Align the CI install with the documented security pin so
tests run against the same hardened version shipped to users.
@CGFixIT CGFixIT marked this pull request as ready for review June 20, 2026 08:03
@CGFixIT CGFixIT merged commit a150202 into main Jun 20, 2026
27 checks passed
@CGFixIT CGFixIT deleted the claude/cyclaw-ci-torch-cve-pin branch June 20, 2026 10:23
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