[fix][sec] Upgrade log4j to 2.25.4 to address CVE-2026-34477, CVE-2026-34478, CVE-2026-34480, CVE-2026-34481 - #25521
Merged
Conversation
…6-34478, CVE-2026-34480, CVE-2026-34481 Upgrades org.apache.logging.log4j:* from 2.25.3 to 2.25.4 to fix: - CVE-2026-34477: verifyHostName attribute silently ignored in TLS configuration - CVE-2026-34478: log injection in Rfc5424Layout due to silent configuration incompatibility - CVE-2026-34480: XmlLayout fails to sanitize characters forbidden by XML 1.0 - CVE-2026-34481: JsonTemplateLayout produces invalid JSON for non-finite floats
utafrali
approved these changes
Apr 14, 2026
utafrali
left a comment
There was a problem hiding this comment.
Clean, minimal security patch that bumps log4j2 from 2.25.3 to 2.25.4 and keeps the LICENSE.bin.txt files in sync. The changes are correct, well-motivated, and follow the project's standard dependency management pattern.
dao-jun
approved these changes
Apr 15, 2026
lhotari
approved these changes
Apr 15, 2026
This was referenced Apr 15, 2026
lhotari
pushed a commit
that referenced
this pull request
Apr 21, 2026
…6-34478, CVE-2026-34480, CVE-2026-34481 (#25521) Upgrades org.apache.logging.log4j:* from 2.25.3 to 2.25.4 to fix: - CVE-2026-34477: verifyHostName attribute silently ignored in TLS configuration - CVE-2026-34478: log injection in Rfc5424Layout due to silent configuration incompatibility - CVE-2026-34480: XmlLayout fails to sanitize characters forbidden by XML 1.0 - CVE-2026-34481: JsonTemplateLayout produces invalid JSON for non-finite floats (cherry picked from commit dfb06f1)
lhotari
pushed a commit
that referenced
this pull request
Apr 21, 2026
…6-34478, CVE-2026-34480, CVE-2026-34481 (#25521) Upgrades org.apache.logging.log4j:* from 2.25.3 to 2.25.4 to fix: - CVE-2026-34477: verifyHostName attribute silently ignored in TLS configuration - CVE-2026-34478: log injection in Rfc5424Layout due to silent configuration incompatibility - CVE-2026-34480: XmlLayout fails to sanitize characters forbidden by XML 1.0 - CVE-2026-34481: JsonTemplateLayout produces invalid JSON for non-finite floats (cherry picked from commit dfb06f1)
priyanshu-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Apr 22, 2026
…6-34478, CVE-2026-34480, CVE-2026-34481 (apache#25521) Upgrades org.apache.logging.log4j:* from 2.25.3 to 2.25.4 to fix: - CVE-2026-34477: verifyHostName attribute silently ignored in TLS configuration - CVE-2026-34478: log injection in Rfc5424Layout due to silent configuration incompatibility - CVE-2026-34480: XmlLayout fails to sanitize characters forbidden by XML 1.0 - CVE-2026-34481: JsonTemplateLayout produces invalid JSON for non-finite floats (cherry picked from commit dfb06f1) (cherry picked from commit 8778389)
nodece
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
May 12, 2026
…6-34478, CVE-2026-34480, CVE-2026-34481 (apache#25521) Upgrades org.apache.logging.log4j:* from 2.25.3 to 2.25.4 to fix: - CVE-2026-34477: verifyHostName attribute silently ignored in TLS configuration - CVE-2026-34478: log injection in Rfc5424Layout due to silent configuration incompatibility - CVE-2026-34480: XmlLayout fails to sanitize characters forbidden by XML 1.0 - CVE-2026-34481: JsonTemplateLayout produces invalid JSON for non-finite floats (cherry picked from commit dfb06f1)
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
log4j 2.25.3 is affected by four CVEs fixed in 2.25.4:
verifyHostNameattribute in<Ssl>configuration was silently ignored in all versions since 2.12.0. TLS connections from SMTP, Socket, and Syslog appenders configured via the nested<Ssl>element were not verifying hostnames, enabling MITM attacks. The fix for CVE-2025-68161 was incomplete and only addressed thelog4j2.sslVerifyHostNamesystem property path.Rfc5424Layoutsilently renamednewLineEscapeanduseTlsMessageFormatattributes in 2.21.0, causing CRLF injection for TCP framing users and a silent TLS-to-plain-TCP downgrade for RFC 5425 users.XmlLayoutdid not sanitize characters forbidden by XML 1.0, producing invalid XML when log messages or MDC values contained them. Depending on the StAX implementation, this either emits malformed XML or throws during the logging call and drops the event.JsonTemplateLayoutproduced invalid JSON (NaN / Infinity / -Infinity) forMapMessageentries containing non-finite floats, which downstream log processors reject per RFC 8259.None of these affect Pulsar users with the default log4j2.yaml configuration, but shipping library versions with known vulnerabilities trips code scanning and downstream security audits.
Modifications
log4j2version ingradle/libs.versions.tomlfrom 2.25.3 to 2.25.4