Skip to content

[cherry-pick][2.57.2] Brotli CVE-2026-111497 fixes (#67596, #67789) - #68041

Merged
elliot-barn merged 6 commits into
releases/2.57.2from
elliot-barn/cherry-pick-2.57.2-brotli
Nov 11, 2026
Merged

elliot-barn merged 6 commits into
releases/2.57.2from
elliot-barn/cherry-pick-2.57.2-brotli

Conversation

@elliot-barn

@elliot-barn elliot-barn commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Brings the Brotli CVE-2026-111497 fixes to releases/2.57.2:

Stacked on #68040 (eMudhra and aiohttp), because both PRs edit the same conda install lines in the Dockerfiles. Merge #68040 first, then retarget this PR to releases/2.57.2.

After this PR, both Dockerfiles match releases/2.58.2 exactly. This pair replaces #68013.

Related issues

Related to #67596, #67789 and #67962 (2.58.2). Together with #68040, this supersedes #68013.

Testing

  • Every non-Dockerfile line this PR changes is a brotli pin; nothing else moves.
  • ci/ci.sh compile_pip_dependencies (py3.11): only brotli's # via line changes.
  • bazel run //ci/raydepsets:raydepsets -- build --all-configs, then --check: "Lock files are up to date."

AI assistance (Claude Code) was used to prepare this change.

🤖 Generated with Claude Code

elliot-barn and others added 2 commits November 10, 2026 18:30
Ports the eMudhra CA compromise and aiohttp DoS fixes from the 2.59.1
squash fed9732 (#67487: #67295, #67301, #67298, #67305, #67304,
#67350) onto releases/2.57.2. The Brotli fixes follow in a separate PR.

A direct cherry-pick conflicts in ~110 lock files because 2.57 is two
minors behind 2.59, so the changes are applied by hand:
- docker/base-deps and base-slim Dockerfiles: same hunks as fed9732
  (certifi 2026.10.19 + pip 26.2.2 via conda, uv 0.13.4, py3.10 pip from
  PyPI).
- Windows/macOS wheel builds: pip 26.2.2, uv 0.13.4.
- aiohttp floor 3.13.3 -> 3.14.4; security-requirements gains aiohttp,
  certifi and virtualenv floors.
- requirements_compiled(_py3.14).txt: aiohttp 3.14.4, certifi
  2026.10.19, virtualenv 21.14.12 and its deps, yarl 1.25.1, version and
  hash blocks taken from 2.58.2.
- All locks regenerated with raydepsets build --all-configs. Locks not
  constrained by the compiled files had the stale package entries
  dropped first so uv re-resolves them.

setup.py's 2.59 RUNTIME_ENV_AGENT_PIP_PACKAGES pin is not ported: on 2.57
the runtime env agent installs aiohttp unpinned.

Old pins that are also left on 2.58.2 and master stay: ray_img_py39.lock,
ci_windows_depset.lock (aiohttp), requirements_ml_byod_3.10.txt,
release/requirements_py310.txt (aiohttp), doc pip-freeze snapshots.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Ports the Brotli 1.2.1 fixes onto releases/2.57.2, on top of the eMudhra
pick:
- #67596: conda brotli-python>=1.2.1 in the base-deps and base-slim
  images; py3.10 (no conda-forge 1.2.1 build) swaps in the PyPI wheel.
- #67789: brotli>=1.2.1 floor in security-requirements and brotli 1.2.1
  in requirements_compiled(_py3.14).txt and every lock that pins it.

The Dockerfiles now match releases/2.58.2 exactly. Locks regenerated
with raydepsets build --all-configs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

The number of changes in this pull request is too large for Gemini Code Assist to generate a review.

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core security The issue or proposal related to security labels Nov 10, 2026

@sai-miduthuri sai-miduthuri 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.

I checked this against master's #67596 (ed39c78f0f) and #67789 (2f5e30a57b). Everything they change is carried over, apart from one comment:

  • Nit: master's #67789 adds -r python/requirements/security-requirements.txt to brotli's # via in requirements_compiled.txt and requirements_compiled_py3.14.txt. Both still say # via gradio here. That doesn't change what gets installed, and the next compile would add it.

What checks out:

  • Both Dockerfiles are identical to master's and releases/2.58.2's, and the lines this PR adds match #67596 exactly.
  • This PR changes all 30 files from #67596 and #67789 that exist on 2.57.2. The other 13 are torch locks that 2.57.2 doesn't have. It also bumps large_image_embedding_py3.10.lock, which master deleted but which a 2.57.2 release test still uses.
  • brotli>=1.2.1 is in security-requirements.txt. brotli is 1.2.1 in both compiled files and in all 28 changed locks, with hashes and # via lines that match master or 2.58.2.
  • The only brotli pin left below 1.2.1 is in requirements_ml_byod_3.10.txt, which master also leaves at 1.1.0.
  • Outside the Dockerfiles, every changed line is a brotli version or hash line. The combined tree is byte-identical to #68013's.

This PR only touches brotli, so the three gaps from my review of #68040 still apply after both PRs land.

elliot-barn and others added 3 commits November 10, 2026 20:40
…generate compiled

Addresses review on #68040:
- Unconstrained locks (TPU base deps, ray-llm testdeps, datatfds,
  llm_batch, multimodal byod py3.10) had floated to the newest releases
  when re-resolved. Set the #67301/#67295/#67304 package set to the
  versions from releases/2.58.2: virtualenv 21.14.12, distlib 0.4.3,
  filelock 3.29.0, platformdirs 4.9.6, python-discovery 1.6.1,
  typing-extensions 4.16.0, certifi 2026.10.19, aiohttp 3.14.4.
  large_image_embedding (stale on 2.58.2) follows its sibling locks.
- certifi 2026.10.19 in ray_img_py39.lock (unused but shipped, as on
  2.58.2/2.59.1/master), ci_windows_depset.lock and docbuild.
- requirements_compiled.txt regenerated with ci/ci.sh
  compile_pip_dependencies (py3.11); only the # via lines change.
- raydepsets build --all-configs, then --check: up to date.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
ci/ci.sh compile_pip_dependencies (py3.11) adds security-requirements to
brotli's # via lines; no pins change. raydepsets build --all-configs
then --check: up to date.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Resolves conflicts from the squash merge of #68040; tree is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
@elliot-barn
elliot-barn merged commit 7822de3 into releases/2.57.2 Nov 11, 2026
4 of 6 checks passed
@elliot-barn
elliot-barn deleted the elliot-barn/cherry-pick-2.57.2-brotli branch November 11, 2026 02:38
elliot-barn added a commit that referenced this pull request Nov 11, 2026
Resolves conflicts from the squash merges of #68040/#68041; tree is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
elliot-barn added a commit that referenced this pull request Nov 11, 2026
…curity fixes (#68047)

## Description

Brings two dependency security fixes that landed on master after the
2.57 cut to `releases/2.57.2`. Both are already on 2.58.x:

- **idna, from #64056.** [CVE-2026-45409 /
GHSA-65pc-fj4g-8rjx](GHSA-65pc-fj4g-8rjx)
is a medium-severity denial of service (CVSS 5.3) in idna before 3.15.
The 2024 fix for CVE-2024-3651 was incomplete: crafted input to
`idna.encode()` can still take a long time to process. 2.57.1 shipped
idna 3.12.
- **log4j, cherry-picked from #64269.** `log4j-api`, `log4j-core` and
`log4j-slf4j-impl` go from 2.25.3 to 2.25.4 in `ray_dist.jar`. 2.25.4
fixes every published log4j-core advisory, including CVE-2026-34477,
-34478, -34479 and -34480 (April 2026) and CVE-2025-68161. Master and
2.58.2 are on 2.25.4.

These are the fixes reported in #64050 and #63919.

**Stacked on #68041** (Brotli), which is stacked on #68040 (eMudhra).
`idna>=3.7` is the line just above #68040's certifi change in
`security-requirements.txt`. Merge #68040, then #68041, then retarget
this PR to `releases/2.57.2`.

## Changes

1. **idna** (`5edd077da0`)
   - `security-requirements.txt`: `idna>=3.7` → `idna>=3.15`.
- `requirements_compiled.txt`: idna 3.18.
`requirements_compiled_py3.14.txt`: idna 3.15. Both as on
`releases/2.58.2`.
   - Locks:
     - Where 2.58.2 has the same lock, it gets 2.58.2's idna entry.
- Some locks are still below 3.15 on 2.58.2 and 2.59.1, and get idna
3.18 here: TPU base deps (3.11), ray-llm testdeps (3.13), datatfds,
llm_batch, the multimodal byod py3.10 locks (3.7) and
`ray_img_py39.lock`.
- Regenerated with `ci/ci.sh compile_pip_dependencies` (py3.11), then
`raydepsets build --all-configs`.
2. **log4j** (`90b2394af3`): a clean cherry-pick of #64269, the three
version lines in `java/dependencies.bzl`.
3. **idna in release tooling** (`ad13264cbc`): 3.7 → 3.18 in two files.
Both are still on 3.7 on master.
- `release/requirements_py310.txt`: the `py_deps_py310` Bazel lock and
the release-test launcher environment.
- `release/ray_release/byod/requirements_ml_byod_3.10.txt`:
unreferenced, left over from the ray-ml image.
- Only the version and hash lines change. The file's generator,
`//release:requirements_py310.update`, can't run on this branch: it
fails on `sphinx==8.2.3` (requires Python ≥3.11) from
`requirements-doc.txt`, with or without this change.

4. **aiohttp in `release/requirements_py310.txt`** (`ea8eb14b97`): this
file was on aiohttp 3.9.5, below #68040's `aiohttp>=3.14.4` floor.
- `requirements_py310.in` gains `aiohttp>=3.14.4` and `idna>=3.15`
floors, next to the existing `certifi` and `h11` floors.
- The `.txt` is recompiled: aiohttp 3.9.5 → 3.14.5, yarl 1.9.4 → 1.25.1,
aiosignal 1.3.1 → 1.4.0, and the new aiohappyeyeballs 2.7.1 and
propcache 0.5.4. No other pin changes.
- How it's recompiled: with the same tool as
`//release:requirements_py310.update` (pip-tools 6.6.0 on pip 22.0.4 and
Python 3.10, `--no-upgrade --generate-hashes`). The only difference:
during the compile, the `release/requirements-doc.txt` symlink is
swapped for the same doc requirements at the versions already in the
`.txt`, because upstream's `sphinx==8.2.3` needs Python ≥3.11. Before
the `.in` change, this reproduces the existing `.txt` byte for byte.

**Not ported from #64056:**
- The `RUNTIME_ENV_AGENT_PIP_PACKAGES` pin. On 2.57 the runtime env
agent installs `aiohttp` unpinned, so its bundled idna is whatever is
current when the wheel is built.
- The aiohttp floor. #68040 already sets 3.14.4.
- The bundled-versions guard test, because it asserts that pin.

## Related issues

Related to #64056, #64269, #64050 and #63919.

## Testing

- `ci/ci.sh compile_pip_dependencies` (py3.11): only idna changes.
- `bazel run //ci/raydepsets:raydepsets -- build --all-configs`, then
`--check`: "Lock files are up to date." Only idna pins change:

  | Before | After |
  |---|---|
  | 3.7 ×6, 3.11 ×6, 3.12 ×91, 3.13 ×3 | 3.15 ×7, 3.18 ×99 |

- `bazel build` of the three log4j Maven artifacts and
`//java:io_ray_ray_api`: succeeded with 2.25.4.
- `release/requirements_py310.txt` on Python 3.10:
- `uv pip install --dry-run --require-hashes` covers all 219 packages,
and a full resolve has no conflicts.
  - `@py_deps_py310_idna` fetches.
- The idna 3.18 hashes match PyPI.
- `release/requirements_py310.txt` after the recompile: `uv pip install
--dry-run --require-hashes` on Python 3.10 covers 221 packages, and a
full resolve has no conflicts.

AI assistance (Claude Code) was used to prepare this change.

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

---------

Signed-off-by: elliot-barn <[email protected]>
Signed-off-by: nh-atuan <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: Nguyễn Hồ Anh Tuấn <[email protected]>
Co-authored-by: Edward Oakes <[email protected]>
elliot-barn added a commit that referenced this pull request Nov 11, 2026
…in release tooling (#68051)

## Description

Closes the remaining security gaps on `releases/2.58.2` so that it
matches the 2.57.2 picks (#68040, #68041, #68047). log4j (2.25.4) and
the `security-requirements.txt` floors are already correct here.

### 1. idna 3.15+ in the remaining locks (`fdcca7fe01`)

[CVE-2026-45409 /
GHSA-65pc-fj4g-8rjx](GHSA-65pc-fj4g-8rjx)
is a medium-severity denial of service in idna before 3.15. 2.58.2 has
the `idna>=3.15` floor from #64056. But locks that aren't constrained by
`requirements_compiled.txt` kept vulnerable idna, and they now get idna
3.18, the compiled pin:

| Lock | Before |
|---|---|
| TPU base deps py3.10–3.13 / py3.14 (these feed the **TPU images**) |
3.11 / 3.13 |
| ray-llm testdeps py3.11/3.12 | 3.13 |
| `datatfds_py3.12`, `llm_batch_single_node_benchmark_py312_cu130` |
3.11 |
| multimodal byod py3.10 release locks (×5) | 3.7 |
| `ray_img_py39.lock`, `requirements_ml_byod_3.10.txt` (unreferenced) |
3.7 |

`large_image_embedding_py3.10.lock` was also still on certifi 2025.1.31
and virtualenv 20.33.1. It now uses its sibling locks' eMudhra pins
(certifi 2026.10.19, virtualenv 21.14.12 and its dependencies, aiohttp
3.14.4), the same as on 2.57.2.

### 2. aiohttp and idna in `release/requirements_py310.txt`
(`30d47f3129`)

This file is the `py_deps_py310` Bazel lock and the release-test
launcher environment. It pinned aiohttp 3.9.5 and idna 3.7.
`requirements_py310.in` gains `aiohttp>=3.14.4` and `idna>=3.15` floors,
and the `.txt` is recompiled:

| Package | Before | After |
|---|---|---|
| aiohttp | 3.9.5 | 3.14.5 |
| yarl | 1.9.4 | 1.25.1 |
| aiosignal | 1.3.1 | 1.4.0 |
| idna | 3.7 | 3.20 |
| aiohappyeyeballs, propcache | none | 2.7.1, 0.5.4 |

No other pin changes.

It's recompiled with the same tool as
`//release:requirements_py310.update`: pip-tools 6.6.0 on pip 22.0.4 and
Python 3.10, `--no-upgrade --generate-hashes`. The one workaround:
`release/requirements-doc.txt`, a symlink to `doc/requirements-doc.txt`,
pins `sphinx==8.2.3`, which needs Python ≥3.11. For the compile, that
symlink was replaced by the same doc requirements at the versions
already in the `.txt`, then restored. Before the `.in` change, this
reproduces the existing `.txt` byte for byte.

### Left as is (same on 2.57.2 and master)

- **`ci_windows_depset.lock`:** compiled for Python 3.8, where aiohttp
tops out at 3.10.11.
- **`ray_img_py39.lock`:** aiohttp stays at 3.11.16, because the Python
3.9 line tops out at 3.13.x.
- **`requirements_ml_byod_3.10.txt`:** aiohttp, brotli and yarl stay as
they are. The file is unreferenced and has no generator.
- **The doc pip-freeze snapshot:** regenerated from the image by the
release docs step.
- **The raydepsets test fixture.**

## Related issues

Related to #64056, #67962, #68047 (2.57.2) and #68048 (master).

## Testing

- `bazel run //ci/raydepsets:raydepsets -- build --all-configs`, then
`--check`: "Lock files are up to date." The locks change only idna and,
in `large_image_embedding`, the package set above.
- `release/requirements_py310.txt`: `uv pip install --dry-run
--require-hashes` on Python 3.10 covers 221 packages, and a full resolve
has no conflicts.
- A scan of every pinned file for aiohttp, certifi, brotli, idna,
virtualenv and yarl below their floors finds only the files listed under
"Left as is".

AI assistance (Claude Code) was used to prepare this change.

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

---------

Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Claude Opus 5.5 <[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 security The issue or proposal related to security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants