Skip to content

security: bump vllm, GitPython for CVE remediation - #2344

Closed
kajalj22 wants to merge 9 commits into
NVIDIA-NeMo:mainfrom
kajalj22:bump/cve-aug2026
Closed

security: bump vllm, GitPython for CVE remediation#2344
kajalj22 wants to merge 9 commits into
NVIDIA-NeMo:mainfrom
kajalj22:bump/cve-aug2026

Conversation

@kajalj22

@kajalj22 kajalj22 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • vllm 0.20.0 → 0.26.0 (addresses security vulnerabilities; also updates flashinfer-python 0.6.8.post1 → 0.6.14 to match)
  • openai <=2.7.2 → <=2.53.0 (vllm 0.26.0 imports `NamespaceTool` from `openai.types.responses`, added in 2.53.0; no breaking changes between 2.7.2 and 2.53.0)
  • GitPython ≥3.1.50 → ≥3.1.57 (addresses security vulnerability; lock resolves to 3.1.58)
  • pyarrow already at 25.0.0 in lock file (existing `>=23.0.1` constraint sufficient; no change needed)
  • diskcache removed as a transitive dep of the updated vllm (no fix available for standalone use, but it's no longer pulled in)

Test plan

  • CI passes (lint, unit tests, pre-commit hooks, server suite)
  • `uv lock` resolves cleanly with no conflicts

🤖 Generated with Claude Code

- vllm 0.20.0 → 0.26.0 (security fix; also updates flashinfer-python 0.6.8.post1 → 0.6.14)
- GitPython 3.1.50 → 3.1.57 (security fix; resolved to 3.1.58 by uv)
- pyarrow already at 25.0.0 in lock (constraint >=23.0.1 unchanged, CVE addressed)
- diskcache removed as transitive dep of old vllm (no standalone fix available)

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22
kajalj22 requested a review from a team as a code owner August 5, 2026 03:10
@copy-pr-bot

copy-pr-bot Bot commented Aug 5, 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.

vllm 0.26.0 imports NamespaceTool from openai.types.responses, which was
added in openai 2.53.0. No breaking changes in the SDK between 2.7.2 and
2.53.0. Bump cap and lock to 2.53.0.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
setuptools reads [tool.distutils.egg_info] egg_base = "cache" from
pyproject.toml and fails if the directory doesn't exist. The hermetic
stage only copies pyproject.toml + uv.lock, so cache/ is never present.
This was masked by Docker layer caching until the lock file changed.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22 kajalj22 added the r0.5.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge. label Aug 5, 2026
Docker hermetic stage uses uv 0.11.29; regenerate lock to match and
avoid --locked mismatch errors in the container build.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
openai 2.53.0 made two breaking changes for Gym:

1. InputTokensDetails.cache_write_tokens is now a required field.
   Add cache_write_tokens=0 as a default in NeMoGymResponseInputTokensDetails
   so all existing callers (anthropic_converter, responses_converter, server
   tests) continue to work without individual changes.

2. Reasoning.context is now a valid optional field (was extra_forbidden
   before). Update test_prunes_nested_extra_fields to use a genuinely
   unknown field, and remove the stale reasoning.context example from
   the validate_streaming_responses_params docstring.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
…nd validation

openai 2.53.0 added three new Optional fields to FunctionTool (BaseModel)
and FunctionToolParam (TypedDict): allowed_callers, defer_loading, output_schema.

These fields were not present in 2.7.2 and cause two kinds of breakage:
1. NeMoGymResponse.model_dump() now includes them in response.tools, breaking
   server tests that compare serialized responses to expected dicts.
2. validate_streaming_responses_params fails when callers round-trip tool dicts
   via FunctionTool.model_dump() (e.g. single_step_tool_use_with_argument_comparison).

Fix: override model_dump in NeMoGymResponse to strip the three new fields from
each tool dict, and pre-strip them from input tools in validate_streaming_responses_params
before validation.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
…nd serialization

NeMoGymResponseCreateParamsNonStreaming now strips allowed_callers,
defer_loading, and output_schema (all None-valued) from tool dicts:
- Before validation via model_validator(mode='before'), so that callers
  using FunctionTool.model_dump() don't fail when defer_loading=None
- After serialization via model_dump() override, because Pydantic v2
  adds absent TypedDict fields as None when dumping List[ToolParam].

Also fix ruff import-sort in responses_streaming.py.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
1. cvdp/requirements.txt: update openai==2.7.2 -> >=2.53.0,<=2.53.0

2. NeMoGymResponseInputTokensDetails.cache_write_tokens: use
   Field(default=0, exclude=True) so the new required field has a
   default but is excluded from serialized output, preserving
   backward-compat format.

3. NeMoGymResponseCreateParamsNonStreaming.tools: change List[ToolParam]
   to List[Any] so Pydantic stops applying TypedDict schema normalization
   (which was adding defer_loading/allowed_callers/output_schema as None
   to every function tool, corrupting round-tripped params).

4. NeMoGymResponse: replace model_dump() override with @model_serializer
   (mode='wrap') so the tool-field stripping applies to BOTH Python and
   Rust/JSON serialization paths (FastAPI, model_dump_json). model_dump()
   overrides are bypassed by Pydantic's internal Rust serializer.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
diskcache has unfixed CVEs and is no longer a transitive dep since
vllm>=0.26.0. Adding it to exclude-dependencies prevents re-introduction
via future transitive pulls, including in server venvs that install
nemo-gym editably.

Signed-off-by: Kajal Jain <kajalj@nvidia.com>
@kajalj22

kajalj22 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #2353

@kajalj22 kajalj22 closed this Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

r0.5.0 Auto-cherrypick to release branch. Apply before merge; cherrypick happens after merge.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants