Skip to content

build(java): upgrade log4j to 2.25.4 - #64269

Merged
edoakes merged 3 commits into
ray-project:masterfrom
nh-atuan:issue-64251
Jul 24, 2026
Merged

edoakes merged 3 commits into
ray-project:masterfrom
nh-atuan:issue-64251

Conversation

@nh-atuan

Copy link
Copy Markdown
Contributor

Description

This upgrades Ray's Java Log4j dependencies from 2.25.3 to 2.25.4 to address CVE-2026-34480 reported in #64251.

The Log4j artifacts are kept on the same version to avoid mixing log4j-api, log4j-core, and log4j-slf4j-impl versions.

Related issues

Closes #64251.

Additional information

Checks:

  • bazelisk build @maven//:org_apache_logging_log4j_log4j_core
  • bazelisk build @maven//:org_apache_logging_log4j_log4j_api @maven//:org_apache_logging_log4j_log4j_slf4j_impl
  • bazelisk build //java:io_ray_ray_api

@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 the Log4j dependencies (log4j-api, log4j-core, and log4j-slf4j-impl) from version 2.25.3 to 2.25.4 in java/dependencies.bzl. There are no review comments, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@ray-gardener ray-gardener Bot added core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Jun 23, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Jul 7, 2026
@nh-atuan

nh-atuan commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Hi maintainers,

Just a friendly ping to keep this PR active.

I've already addressed the previous review feedback and would really appreciate a review whenever someone from the Ray Core team has time.

Thank you!

@github-actions github-actions Bot added unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it. and removed stale The issue is stale. It will be closed within 7 days unless there are further conversation labels Jul 8, 2026
@yankees5963

Copy link
Copy Markdown

Can this be merged?

@nh-atuan

Copy link
Copy Markdown
Contributor Author

Hi maintainers,

All tests are passing now, and this PR is ready for review. Since it's currently only waiting for a code owner review, I'd really appreciate it if someone from the Ray Core team could take a look when available.

Thanks in advance!

@edoakes edoakes added the go add ONLY when ready to merge, run all tests label Jul 23, 2026
@edoakes edoakes self-assigned this Jul 23, 2026
@edoakes
edoakes enabled auto-merge (squash) July 23, 2026 15:53
Copilot AI review requested due to automatic review settings July 23, 2026 21:36

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@github-actions
github-actions Bot disabled auto-merge July 23, 2026 21:36
@edoakes
edoakes merged commit 1831bd5 into ray-project:master Jul 24, 2026
3 checks passed
@nh-atuan
nh-atuan deleted the issue-64251 branch July 25, 2026 12:35
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
## Description

This upgrades Ray's Java Log4j dependencies from 2.25.3 to 2.25.4 to
address CVE-2026-34480 reported in ray-project#64251.

The Log4j artifacts are kept on the same version to avoid mixing
`log4j-api`, `log4j-core`, and `log4j-slf4j-impl` versions.

## Related issues

Closes ray-project#64251.

## Additional information

Checks:
- `bazelisk build @maven//:org_apache_logging_log4j_log4j_core`
- `bazelisk build @maven//:org_apache_logging_log4j_log4j_api
@maven//:org_apache_logging_log4j_log4j_slf4j_impl`
- `bazelisk build //java:io_ray_ray_api`

Signed-off-by: nh-atuan <[email protected]>
Co-authored-by: Edward Oakes <[email protected]>
Signed-off-by: 400Ping <[email protected]>
elliot-barn pushed a commit that referenced this pull request Nov 10, 2026
## Description

This upgrades Ray's Java Log4j dependencies from 2.25.3 to 2.25.4 to
address CVE-2026-34480 reported in #64251.

The Log4j artifacts are kept on the same version to avoid mixing
`log4j-api`, `log4j-core`, and `log4j-slf4j-impl` versions.

## Related issues

Closes #64251.

## Additional information

Checks:
- `bazelisk build @maven//:org_apache_logging_log4j_log4j_core`
- `bazelisk build @maven//:org_apache_logging_log4j_log4j_api
@maven//:org_apache_logging_log4j_log4j_slf4j_impl`
- `bazelisk build //java:io_ray_ray_api`

Signed-off-by: nh-atuan <[email protected]>
Co-authored-by: Edward Oakes <[email protected]>
(cherry picked from commit 1831bd5)
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]>
edoakes pushed a commit that referenced this pull request Nov 20, 2026
## Description

Bumps the Java dependencies bundled into `ray_dist.jar`:

- log4j (`log4j-api`, `log4j-core`, `log4j-slf4j-impl`) 2.25.4 ->
2.25.5, for CVE-2026-49844. The three artifacts stay on the same
version.
- `jackson-databind` 2.18.8 -> 2.18.11, for the jackson-core and
jackson-databind CVEs listed in #67733. `jackson-core` isn't listed in
`dependencies.bzl`; `jackson-databind` 2.18.11 depends on `jackson-core`
2.18.11, so it comes along.

`ci/build/bundled_dependency_versions_test.py` now expects log4j 2.25.5
and also checks the `jackson-databind` version, same as it already does
for `httpcore5`.

No open PR touches these versions (searched open PRs for log4j/jackson).
Same kind of change as #64269 and #64575.

Tests:
- `pytest ci/build/bundled_dependency_versions_test.py`: 4 passed
- Checked that all new artifacts are on Maven Central and that the
`jackson-databind` 2.18.11 POM pulls `jackson-core` 2.18.11. I didn't
run the Bazel Java build locally, so CI covers that.

AI assistance (Claude) was used to put this together. I reviewed the
diff and ran the test above.

## Related issues

Closes #67733
Closes #67734

Signed-off-by: Lucas Barros <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core go add ONLY when ready to merge, run all tests unstale A PR that has been marked unstale. It will not get marked stale again if this label is on it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade log4j-core to 2.25.4 to address CVE-2026-34480

4 participants