Skip to content

build: bump orjson, python-multipart, pyarrow, anyio, and remove ray's Java worker jar for CVE remediation - #3779

Merged
kajalj22 merged 5 commits into
NVIDIA-NeMo:mainfrom
kajalj22:bump-orjson-multipart-cve
Sep 29, 2026
Merged

kajalj22 merged 5 commits into
NVIDIA-NeMo:mainfrom
kajalj22:bump-orjson-multipart-cve

Conversation

@kajalj22

@kajalj22 kajalj22 commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Bumps four packages and removes a bundled vulnerable jar, all flagged by container vuln scans:

  • orjson >=3.11.6 (resolves to 3.12.0): unbounded recursion on deeply nested JSON documents
  • python-multipart >=0.0.27 (resolves to 0.0.32): DoS via unbounded multipart part headers
  • pyarrow >=15.0.2 -> >=25.0.1 (job_bench): mlflow-skinny's actual constraint is pyarrow>=23.0.1 with no upper bound; the old "stay below mlflow's <25 cap" comment was stale
  • anyio >=4.15.1 pinned at the root pyproject.toml: mcp is a core nemo-gym dependency and its own anyio>=4.10.0 floor was resolving to the CVE-affected 4.10.0 version in the main image build
  • Docker: remove ray_dist.jar (Ray's Java cross-language worker) from installed venvs at build time. It bundles an outdated httpcore5 with a known DoS CVE (GHSA-hf6x-8p5f-cgmf); no released ray version fixes it yet. Gym never uses Ray's Java worker, so the jar is dead weight — removing it doesn't affect ray.init(), remote tasks, actors, or ray.serve
  • uv.lock regenerated

Validation

  • ruff check . / ruff format --check .: pass
  • uv lock: resolves cleanly
  • Built job_bench's venv locally: pyarrow==25.0.1 resolved, all 36 tests pass
  • Built miniswe_sandboxed_agent's venv locally: anyio==4.15.1 resolved, imports cleanly
  • Validated the jar removal in an isolated venv: ray.init(), remote functions, actors, and ray.serve (including its HAProxy-based ingress) all work identically with the jar deleted
  • Draft until CI is green

Checklist

  • I have read the contributing guidelines.
  • The change is focused on these CVE remediations.

- orjson >=3.11.6 (resolves to 3.12.0): fixes unbounded recursion on
  deeply nested JSON documents (GHSA-hx9q-6w63-j58v)
- python-multipart >=0.0.27 (resolves to 0.0.32): fixes DoS via
  unbounded multipart part headers (GHSA-pp6c-gr5w-3c5g)
- uv.lock regenerated

Signed-off-by: Kajal Jain <[email protected]>
@copy-pr-bot

copy-pr-bot Bot commented Sep 29, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 54b4f58

- pyarrow >=15.0.2 -> >=25.0.1 (job_bench): mlflow-skinny's actual
  constraint is pyarrow>=23.0.1 with no upper bound; the old ">=15.0.2,
  mlflow caps <25" comment was stale, root already resolves to
  pyarrow==25.0.0 today.
- anyio >=4.15.1 pinned at the root (previously only pinned in
  miniswe_sandboxed_agent's own requirements.txt). mcp is a core
  nemo-gym dependency, so its anyio>=4.10.0 floor was resolving to the
  CVE-affected 4.10.0 in the main image build, not just that one
  per-server venv.
- uv.lock regenerated

Validated locally: job_bench (36 tests) and miniswe_sandboxed_agent
both resolve and import cleanly with the new pins.

Signed-off-by: Kajal Jain <[email protected]>
@kajalj22 kajalj22 changed the title build: bump orjson and python-multipart for CVE remediation build: bump orjson, python-multipart, pyarrow, and anyio for CVE remediation Sep 29, 2026
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 7b7c3eb

@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 2c42255

ananthsub
ananthsub previously approved these changes Sep 29, 2026
ray_dist.jar (Ray's Java cross-language worker) bundles an outdated
httpcore5 with a known DoS CVE (GHSA-hf6x-8p5f-cgmf). No released ray
version fixes this yet (the pin exists on ray's own master branch but
hasn't shipped). Gym never uses Ray's Java worker, so remove the jar
from installed venvs at build time instead of waiting on upstream.

Scoped to site-packages paths only, not uv's raw cache directories:
deleting a file from the cache that uv's hardlink-based install expects
to still be present could break creating a fresh venv later for a
resources server that wasn't prefetched into this image.

Validated locally: with the jar deleted, ray.init(), remote tasks,
actors, and ray.serve (including its HAProxy-based ingress) all work
identically to the baseline with the jar present.

Signed-off-by: Kajal Jain <[email protected]>
@kajalj22 kajalj22 changed the title build: bump orjson, python-multipart, pyarrow, and anyio for CVE remediation build: bump orjson, python-multipart, pyarrow, anyio, and remove ray's Java worker jar for CVE remediation Sep 29, 2026
@kajalj22

Copy link
Copy Markdown
Contributor Author

/ok to test 3db8fee

@kajalj22
kajalj22 added this pull request to the merge queue Sep 29, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/36625019939

Merged via the queue into NVIDIA-NeMo:main with commit adec90f Sep 29, 2026
40 checks passed
@kajalj22
kajalj22 deleted the bump-orjson-multipart-cve branch September 29, 2026 20:30

This branch was previously deployed

1 inactive deployment
public — 3db8feeb Deployed Sep 29, 2026 by copy-pr-bot[bot] via release / finalize / notify #3968
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.

3 participants