Skip to content

[cherry-pick][2.60.0][deps] Bump virtualenv to 21.14.12 for eMudhra CA compromise (#67301) - #67343

Merged
sai-miduthuri merged 1 commit into
sai-miduthuri/cherry-pick-67305-2.60.0from
sai-miduthuri/cherry-pick-67301-2.60.0
Oct 26, 2026
Merged

sai-miduthuri merged 1 commit into
sai-miduthuri/cherry-pick-67305-2.60.0from
sai-miduthuri/cherry-pick-67301-2.60.0

Conversation

@sai-miduthuri

@sai-miduthuri sai-miduthuri commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Cherry-pick of #67301 (master commit 8fdacd3) onto releases/2.60.0.

Why

This is a follow-up to #67295 for the eMudhra intermediate CA compromise. Ray creates pip runtime_env venvs with virtualenv --no-download, which seeds each venv with the pip bundled inside virtualenv. The virtualenv on this branch, 21.2.4, bundles pip 26.0.1, whose vendored certifi still trusts the compromised intermediates. virtualenv 21.14.12 bundles pip 26.2.2.

#67301 moves virtualenv to 21.14.12 in requirements_compiled*.txt and the lock files, together with the minimum versions virtualenv 21.14 raises:

  • packaging to 26.3
  • typing-extensions to 4.16.0
  • distlib to 0.4.3
  • python-discovery to 1.6.1

It also adds virtualenv>=21.14.12 to security-requirements.txt. As on master, the two ray-llm base_extra_testdeps locks move langchain-core from 0.3.84 to 0.3.76, because every langchain-core from 0.3.77 on caps packaging<26.

Cherry-pick details

Applied with git cherry-pick -x. Git merged 104 of the 106 files without conflicts, and in those files the added and removed lines are identical to the master commit. "Deviations from #67301" below covers the other files.

This PR is stacked on the pick of #67305 (#67342), because both edit security-requirements.txt.

Not a duplicate: this branch doesn't contain #67301, and no PR against releases/2.60.0 references it.

Deviations from #67301

  • python/requirements_compiled_py3.14.txt: this branch maintains this file by hand (ci/ci.sh has no py3.14 compile step), so its surrounding lines differ from master's.
    • Same as [deps] Bump virtualenv to 21.14.12 for eMudhra CA compromise #67301: the five version changes, and its # via edits: packaging gains virtualenv, and platformdirs loses python-discovery.
    • Left out: master's -r python/requirements/security-requirements.txt line under virtualenv. On this branch that file isn't an input to the py3.14 file.
  • python/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lock: this branch compiles that lock without Ray's py3.14 constraints, so it had its own versions: packaging 26.2, python-discovery 1.3.1 and virtualenv 21.3.3. This PR replaces the five entries with [deps] Bump virtualenv to 21.14.12 for eMudhra CA compromise #67301's versions and hashes, keeps the branch's # via lists, and applies the same two # via edits.
  • Left out python/deplocks/docs/docstring_examples_base_depset_py3.10.lock and docstring_examples_depset_py3.10.lock: these depsets don't exist on this branch.

Testing

Command Result
pre-commit run --files <the changed files> Passed
bazel run //ci/raydepsets:raydepsets -- build --all-configs --check, run on the top of this stack (through the pick of #67304) Passed: "Lock files are up to date."

I didn't run the runtime_env tests locally. CI runs them, along with raydepsets build --all-configs --check and the image builds.

AI assistance was used to prepare this cherry-pick.

🤖 Generated with Claude Code

@sai-miduthuri
sai-miduthuri requested review from a team as code owners October 23, 2026 19:31
@sai-miduthuri sai-miduthuri changed the title [deps] Bump virtualenv to 21.14.12 for eMudhra CA compromise (#67301) [cherry-pick][2.60.0][deps] Bump virtualenv to 21.14.12 for eMudhra CA compromise (#67301) Oct 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates various Python dependency lock files across multiple environments, notably upgrading virtualenv to 21.14.12, packaging to 26.3, typing-extensions to 4.16.0, and python-discovery to 1.6.1. However, the dependency resolution has caused an unintended downgrade of langchain-core from 0.3.84 to 0.3.76 in the Python 3.11 and 3.12 LLM test dependency lock files. It is highly recommended to add a constraint or pin langchain-core>=0.3.84 in the requirements files to prevent potential regressions.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4aee70c. Configure here.

@sai-miduthuri sai-miduthuri added the go add ONLY when ready to merge, run all tests label Oct 23, 2026
@sai-miduthuri
sai-miduthuri removed this pull request from stack #67345 October 23, 2026 21:44
@sai-miduthuri
sai-miduthuri requested a review from a team as a code owner October 23, 2026 21:45
@sai-miduthuri
sai-miduthuri force-pushed the sai-miduthuri/cherry-pick-67301-2.60.0 branch from 4aee70c to 68213a5 Compare October 23, 2026 21:45
Follow-up to #67295 / #67298 for the eMudhra intermediate CA compromise
(https://emudhra.we-have-a-problem.com/).

The `pip` runtime_env creates venvs with `python -m virtualenv ...
--no-download` (`python/ray/_private/runtime_env/virtualenv_utils.py`),
which seeds each venv with the pip bundled **inside** virtualenv, not
the image's pip. Ray then runs that pip to install the user's packages
(`runtime_env/pip.py`), only reinstalling pip if the user sets
`pip_version`.

- virtualenv 21.2.4 (current lock) bundles pip 26.0.1, whose vendored
certifi still trusts the compromised intermediates.
- virtualenv 21.14.12 (2026-10-21) bundles pip 26.2.2.

So even after #67295 every pip runtime_env on Ray images gets an
affected pip. This applies to all Linux images (`ray_img`, base, llm,
ray-torch locks), not only Windows/macOS. Users who `pip install ray`
themselves already get the latest virtualenv (`ray[default]` only
requires `virtualenv >=20.0.24, !=20.21.1`).

virtualenv 21.14 raises several minimums, so these move together in
`requirements_compiled.txt`, `requirements_compiled_py3.14.txt` and the
locks:

| Package | From | To | Why |
|---|---|---|---|
| virtualenv | 21.2.4 | 21.14.12 | bundled pip 26.2.2 |
| packaging | 25.0 (26.1 on py3.14) | 26.3 | virtualenv
`packaging>=26.3` |
| typing-extensions | 4.15.0 | 4.16.0 | virtualenv `>=4.16` (py<3.11) |
| distlib | 0.4.0 | 0.4.3 | virtualenv `>=0.4.3` |
| python-discovery | 1.2.2 | 1.6.1 | virtualenv `>=1.6.1` |

- The compiled files were edited in place (versions plus the `# via`
changes: packaging gains `virtualenv`, platformdirs loses
`python-discovery`). `uv pip compile` of both files with only these five
pins changed resolves on py3.10/3.11 (main file) and py3.14 (py3.14
file) with no other version moving, so nothing in the full set caps
`packaging<26` or `typing-extensions<4.16`.
- All locks were regenerated with raydepsets (`--all-configs`, uv 0.9.26
from `WORKSPACE`). Constrained depsets change only the five packages
above.
- Unconstrained depsets (TPU base deps, ray-llm `base_extra_testdeps`,
`datatfds`, release BYOD audio/document/image/video/llm_batch) kept
their old virtualenv because uv prefers existing pins. They were
upgraded with `-P` for virtualenv and its direct deps, pinned to the
compiled versions (incl. filelock 3.29.0 / platformdirs 4.9.6), then
re-normalized with raydepsets.
- **langchain-core 0.3.84 → 0.3.76** in the two ray-llm
`base_extra_testdeps` locks (release tests only): every langchain-core
from 0.3.77 caps `packaging<26`. Moving forward instead needs
`langchain-text-splitters` 1.x, which is out of scope here.
- `python/deplocks/ray_img/ray_img_py39.lock` is orphaned (no py3.9
depset) and left at virtualenv 20.29.1.
- `python/requirements/security-requirements.txt`: adds
`virtualenv>=21.14.12` (the first virtualenv release bundling pip
26.2.2), so a future `ci/ci.sh compile_pip_dependencies` /
`compile_pip_dependencies_py314` run (both take this file as an input)
can't fall back to a virtualenv that seeds runtime_env venvs with an
affected pip. virtualenv's `# via` in both compiled files gains `-r
python/requirements/security-requirements.txt`; no lock changes.
Adjacent-line edits to the same 3-line file are also in #67305 (certifi)
and #67304 (aiohttp); whichever merges later needs a trivial rebase.

Needs a CI round on the runtime_env tests (this is the tool that builds
every pip runtime_env venv); no local runtime_env test run yet.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 8fdacd3)
Signed-off-by: Sai Miduthuri <[email protected]>
@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core security The issue or proposal related to security labels Oct 24, 2026
@sai-miduthuri
sai-miduthuri merged commit 7845c24 into releases/2.60.0 Oct 26, 2026
5 checks passed
@sai-miduthuri
sai-miduthuri deleted the sai-miduthuri/cherry-pick-67301-2.60.0 branch October 26, 2026 10:38
sai-miduthuri added a commit that referenced this pull request Oct 26, 2026
…e python to 3.10 (#67256) (#67320)

Cherry-pick of #67256 (master commit
dc5d25c) onto `releases/2.60.0`.

## Why

On this branch, every Python 3.10 base image that misses the wanda cache
fails to build. In postmerge build 20439, that was:

- All 11 `ray-slim` py3.10 base images.
- 3 aarch64 py3.10 CUDA base images.
- `smoke test build-docker.sh`, which always builds `base-deps` from
scratch.

Each one fails in its `conda install python=3.10` step:

```
RemoveError: This operation will remove conda without replacing it with
another version of conda.
```

conda-forge `certifi` builds uploaded since 2026-10-19 require
`python>=3.11`, so the py3.10 solve drops `certifi`, `requests` and
`conda`. #67256 caps `certifi<2026` for Python 3.10 only, in
`docker/base-deps/Dockerfile` and `docker/base-slim/Dockerfile`.

On master, the smoke test failed in postmerge builds 20426 and 20436. It
has passed in every build since 20445, the first to include #67256.

## Cherry-pick details

Applied cleanly with `git cherry-pick -x`. The change is identical to
the master commit: the same 2 files, 19 insertions and 2 deletions, and
the same `git patch-id --stable`.

No prerequisite commits are missing. Both Dockerfiles on this branch
were identical to #67256's parent, so after the pick they match master
at dc5d25c.

This PR is the bottom of stack #67354, in master's order. Above it are
the picks of #67011 (#67321), #67295 (#67322), #67305 (#67342), #67301
(#67343), #67304 (#67344) and #67350 (#67352). #67011 and #67295 change
base image inputs, so their image builds need this fix. At the top of
the stack, the pick of #67350 replaces this cap with a
`certifi=2026.10.19` pin, as on master.

Not a duplicate: this branch doesn't contain #67256, and no PR against
`releases/2.60.0` references it.

## Testing

| Command | Result |
|---|---|
| `pre-commit run --files docker/base-deps/Dockerfile
docker/base-slim/Dockerfile` | Passed (trailing whitespace, end of file,
large files) |

This PR changes the base image inputs, so CI rebuilds the base images,
including the py3.10 ones, instead of taking them from the cache. I
didn't build the images locally.

AI assistance was used to prepare this cherry-pick.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Sai Miduthuri <[email protected]>
Co-authored-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
sai-miduthuri added a commit that referenced this pull request Oct 26, 2026
…n images for eMudhra CA compromise (#67295) (#67322)

Cherry-pick of #67295 (master commit
79dcc96) onto `releases/2.60.0`.

## Why

The private keys of eight eMudhra intermediate CAs were compromised, and
images built from this branch still trust them. They ship pip 24.3.1,
which trusts its own vendored `certifi`, and an older `certifi` pin in
the lock files. #67295 changes three things:

- It installs pip 26.2.2 in `docker/base-deps` and `docker/base-slim`.
Python 3.10 gets pip from PyPI with `uv`, because conda-forge's pip
26.2.2 requires Python 3.11 or newer.
- It moves the `uv` binary to 0.13.4.
- It pins `certifi` 2026.10.19 in `requirements_compiled*.txt` and the
lock files.

#67295 has the full analysis.

## Cherry-pick details

Applied with `git cherry-pick -x`. Git merged 112 of the 113 files
without conflicts, and in those files the added and removed lines are
identical to the master commit. "Deviations from #67295" below covers
the other files.

After the pick:

- `docker/base-deps/Dockerfile` and `docker/base-slim/Dockerfile` match
master at 79dcc96.
- Every `certifi` pin in `python/deplocks/`,
`python/requirements_compiled*.txt` and `release/ray_release/byod/` is
2026.10.19, as on master.

This PR is stacked on the picks of #67256 (#67320) and #67011 (#67321).
Its Dockerfile changes edit lines that #67256 adds, and #67011 sits
below it to keep master's order. The picks of #67305 (#67342), #67301
(#67343), #67304 (#67344) and #67350 (#67352) sit on top of it.

Not a duplicate: this branch doesn't contain #67295, and no PR against
`releases/2.60.0` references it.

## Deviations from #67295

- **`python/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lock`:** this
branch compiles that lock without the `requirements_compiled_py3.14.txt`
constraint, so its `certifi` pin was 2026.5.20 rather than master's
2026.4.22, and its `# via` lines differ. This PR replaces its `certifi`
entry with #67295's `certifi==2026.10.19` and hashes, and keeps the
branch's `# via` lines.
- **Left out
`python/deplocks/docs/docstring_examples_base_depset_py3.10.lock` and
`docstring_examples_depset_py3.10.lock`:** these depsets don't exist on
this branch.

## Testing

| Command | Result |
|---|---|
| `pre-commit run --files <the 113 changed files>` | Passed (trailing
whitespace, end of file, large files) |

I didn't run the dependency check or build the images locally. On this
PR, CI's `:tapioca: build: raydepsets: compile all dependencies` job
runs `raydepsets build --all-configs --check`, and the image jobs
rebuild the base images with pip 26.2.2 and the new locks.

AI assistance was used to prepare this cherry-pick.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Sai Miduthuri <[email protected]>
Co-authored-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
sai-miduthuri added a commit that referenced this pull request Oct 26, 2026
…here (#67305) (#67342)

Cherry-pick of #67305 (master commit
aab6295) onto `releases/2.60.0`.

## Why

This is a follow-up to #67295 for the eMudhra intermediate CA
compromise. #67295, picked in #67322, pins `certifi==2026.10.19` in the
compiled requirements and lock files. #67305 raises the `certifi` floor
to `>=2026.10.19` in the files those are compiled from, so a future
recompile can't resolve an affected `certifi`:

- `python/requirements/security-requirements.txt`
- `python/requirements/cloud-requirements.txt`
- `release/requirements_py310.in`
- `release/requirements_windows.in`

No compiled or lock files change, because every compiled output in this
stack already pins 2026.10.19.

## Cherry-pick details

Applied cleanly with `git cherry-pick -x`. The change is identical to
the master commit: the same 4 files, 4 insertions and 4 deletions, and
the same `git patch-id --stable`.

No prerequisite commits are missing. The 4 files were identical to
#67305's parent, so after the pick they match master at aab6295.

This PR is stacked on #67322 (the pick of #67295), because the new floor
only matches the compiled pins once #67295 is in. The picks of #67301
(#67343) and #67304 (#67344) sit on top of it, because all three edit
adjacent lines of `security-requirements.txt`.

Not a duplicate: this branch doesn't contain #67305, and no PR against
`releases/2.60.0` references it.

## Testing

| Command | Result |
|---|---|
| `pre-commit run --files <the 4 changed files>` | Passed |

AI assistance was used to prepare this cherry-pick.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Sai Miduthuri <[email protected]>
Co-authored-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
sai-miduthuri added a commit that referenced this pull request Oct 26, 2026
CVE-2026-111066, GHSA-2g87-pp6c-29x5 (#67304) (#67344)

Cherry-pick of #67304 (master commit
9ab25fe) onto `releases/2.60.0`.

## Why

aiohttp 3.14.3, which this branch ships, has three high-severity
advisories that are fixed in 3.14.4: CVE-2026-111064, CVE-2026-111066
and GHSA-2g87-pp6c-29x5. Ray runs aiohttp servers in two places: the
runtime_env agent, from the copy vendored into the wheel, and the
dashboard.

#67304 makes these changes:

- `python/setup.py`: moves the vendored pin to `aiohttp==3.14.4` and the
`ray[default]` floor to `>= 3.14.4`.
- `python/requirements.txt`, `python/requirements/test-requirements.txt`
and `security-requirements.txt`: raise the `aiohttp` floor to 3.14.4.
- The compiled requirements and lock files: move to `aiohttp` 3.14.4 and
`yarl` 1.25.1. aiohttp 3.14.4 requires `yarl>=1.25.1`.

Behavior change in aiohttp 3.14.4: `application/x-www-form-urlencoded`
posts with more than 1000 fields now get a `413` response by default.

## Cherry-pick details

Applied with `git cherry-pick -x`. Git merged 107 of the 110 files
without conflicts.
`python/deplocks/ray-torch/ray-torch-cu128_base_py3.11.lock` also
conflicted, but only in surrounding lines, and its resolved changes are
identical to master's. In those 108 files the added and removed lines
are identical to the master commit. "Deviations from #67304" below
covers the other files.

This PR is stacked on the pick of #67301 (#67343), because both edit
`security-requirements.txt`. The pick of #67350 (#67352) sits on top of
it.

Not a duplicate: this branch doesn't contain #67304, and no PR against
`releases/2.60.0` references it.

## Deviations from #67304

- **`python/requirements_compiled_py3.14.txt`:** as in the pick of
#67301, this PR keeps this branch's hand-maintained lines.
  - **Same as #67304:** `aiohttp` 3.14.4 and `yarl` 1.25.1.
- **Left out:** master's `-r
python/requirements/security-requirements.txt` line under `aiohttp`. On
this branch that file isn't an input to the py3.14 file.
- **`python/deplocks/ray-torch/ray-torch-cu128_base_py3.14.lock`:** this
branch had `yarl` 1.24.2 instead of master's 1.23.0. This PR replaces
its `aiohttp` and `yarl` entries with #67304's versions and hashes, and
keeps the branch's `# via` lists.
- **Left out
`python/deplocks/docs/docstring_examples_base_depset_py3.10.lock` and
`docstring_examples_depset_py3.10.lock`:** these depsets don't exist on
this branch.

## Testing

| Command | Result |
|---|---|
| `pre-commit run --files <the changed files>` | Passed |
| `bazel run //ci/raydepsets:raydepsets -- build --all-configs --check`,
run on the top of this stack (through the pick of #67304) | Passed:
"Lock files are up to date." |

I didn't run anything else locally. CI's `:coral: reef: ci+release
tooling tests` job runs `//ci/build:bundled_dependency_versions_test`,
which checks the vendored `aiohttp==3.14.4` pin. CI also runs the
raydepsets check and the image builds.

AI assistance was used to prepare this cherry-pick.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Elliot Barnwell <[email protected]>
Signed-off-by: Sai Miduthuri <[email protected]>
Co-authored-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
sai-miduthuri added a commit that referenced this pull request Oct 26, 2026
…a fix releases on every Python (#67350) (#67352)

Cherry-pick of #67350 (master commit
9a44846) onto `releases/2.60.0`.

## Why

#67256, picked in #67320 at the bottom of this stack, avoids the py3.10
`RemoveError` by capping conda's `certifi` at `<2026` for Python 3.10.
With that cap, conda installs `certifi` 2025.11.12, which still trusts
the compromised eMudhra roots. The py3.10 images end up patched only
because the lock install overwrites it with `certifi` 2026.10.19, which
leaves stale `conda-meta` and package-cache records behind.

conda-forge has since patched `certifi` 2026.10.19 to allow Python 3.10.
#67350 pins `certifi=2026.10.19` in the conda step for every Python
version, matching the lock files, and removes the py3.10-only cap. pip
26.2.2 still comes from PyPI on Python 3.10.

## Cherry-pick details

Applied cleanly with `git cherry-pick -x`. The change is identical to
the master commit: the same 2 files, 20 insertions and 16 deletions, and
the diff matches line for line.

No prerequisite commits are missing. #67350 edits the conda block that
#67256 added and #67295 extended. Below this PR, the picks of #67256
(#67320) and #67295 (#67322) leave both Dockerfiles identical to
#67350's parent. After this pick they match master at 9a44846.

This PR is the top of stack #67354. It was merged to master after every
other PR in the stack, so it goes last here too. Below it are the picks
of:

- #67256 (#67320)
- #67011 (#67321)
- #67295 (#67322)
- #67305 (#67342)
- #67301 (#67343)
- #67304 (#67344)

Not a duplicate: this branch doesn't contain #67350, and no other PR
against `releases/2.60.0` picks it.

## Testing

| Command | Result |
|---|---|
| `pre-commit run --files docker/base-deps/Dockerfile
docker/base-slim/Dockerfile` | Passed (trailing whitespace, end of file,
large files) |

I didn't build the images locally. This PR changes the base image
inputs, so CI rebuilds the base images, including the py3.10 ones.
#67350's own test ran the same conda step in
`condaforge/miniforge3:24.11.3-0` for Python 3.10 to 3.14 in both
Dockerfiles.

AI assistance was used to prepare this cherry-pick.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: Sai Miduthuri <[email protected]>
Co-authored-by: Elliot Barnwell <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests security The issue or proposal related to security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants