Skip to content

Update dependency org.apache.logging.log4j:log4j-core to v2.25.4 [SECURITY] - autoclosed#100

Closed
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/maven-org.apache.logging.log4j-log4j-core-vulnerability
Closed

Update dependency org.apache.logging.log4j:log4j-core to v2.25.4 [SECURITY] - autoclosed#100
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/maven-org.apache.logging.log4j-log4j-core-vulnerability

Conversation

@renovate

@renovate renovate Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
org.apache.logging.log4j:log4j-core (source) 2.17.12.25.4 age confidence

Apache Log4j does not verify the TLS hostname in its Socket Appender

CVE-2025-68161 / GHSA-vc5p-v9hr-52mj

More information

Details

The Socket Appender in Apache Log4j Core versions 2.0-beta9 through 2.25.2 does not perform TLS hostname verification of the peer certificate, even when the verifyHostName configuration attribute or the log4j2.sslVerifyHostName system property is set to true.

This issue may allow a man-in-the-middle attacker to intercept or redirect log traffic under the following conditions:

  • The attacker is able to intercept or redirect network traffic between the client and the log receiver.
  • The attacker can present a server certificate issued by a certification authority trusted by the Socket Appender’s configured trust store (or by the default Java trust store if no custom trust store is configured).

Users are advised to upgrade to Apache Log4j Core version 2.25.3, which addresses this issue.

As an alternative mitigation, the Socket Appender may be configured to use a private or restricted trust root to limit the set of trusted certificates.

Severity

  • CVSS Score: 6.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Apache Log4j Core: Silent log event loss in XmlLayout due to unescaped XML 1.0 forbidden characters

CVE-2026-34480 / GHSA-3pxv-7cmr-fjr4

More information

Details

Apache Log4j Core's XmlLayout, in versions up to and including 2.25.3, fails to sanitize characters forbidden by the XML 1.0 specification, producing invalid XML output whenever a log message or MDC value contains such characters.

The impact depends on the StAX implementation in use:

  • JRE built-in StAX: Forbidden characters are silently written to the output, producing malformed XML. Conforming parsers must reject such documents with a fatal error, which may cause downstream log-processing systems to drop the affected records.
  • Alternative StAX implementations (e.g., Woodstox, a transitive dependency of the Jackson XML Dataformat module): An exception is thrown during the logging call, and the log event is never delivered to its intended appender, only to Log4j's internal status logger.

Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue by sanitizing forbidden characters before XML output.

Severity

  • CVSS Score: 6.9 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Apache Log4j Core: verifyHostName attribute silently ignored in TLS configuration

CVE-2026-34477 / GHSA-6hg6-v5c8-fphq

More information

Details

The fix for CVE-2025-68161 was incomplete: it addressed hostname verification only when enabled via the log4j2.sslVerifyHostName system property, but not when configured through the verifyHostName attribute of the <Ssl> element.

Although the verifyHostName configuration attribute was introduced in Log4j Core 2.12.0, it was silently ignored in all versions through 2.25.3, leaving TLS connections vulnerable to interception regardless of the configured value.

A network-based attacker may be able to perform a man-in-the-middle attack when all of the following conditions are met:

  • An SMTP, Socket, or Syslog appender is in use.
  • TLS is configured via a nested element.
  • The attacker can present a certificate issued by a CA trusted by the appender's configured trust store, or by the default Java trust store if none is configured.

This issue does not affect users of the HTTP appender, which uses a separate verifyHostname attribute that was not subject to this bug and verifies host names by default.

Users are advised to upgrade to Apache Log4j Core 2.25.4, which corrects this issue.

Severity

  • CVSS Score: 6.3 / 10 (Medium)
  • Vector String: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:L/SA:N

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Configuration

📅 Schedule: (in timezone Europe/Berlin)

  • Branch creation
    • ""
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Never, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies label May 6, 2026
@renovate renovate Bot requested a review from a team May 6, 2026 12:20
@sonar-review-alpha

sonar-review-alpha Bot commented May 6, 2026

Copy link
Copy Markdown

Summary

⚠️ The PR description exceeded the analysis limit and was truncated. The review may not reflect all context.

Pure dependency version bump for log4j-core from 2.17.1 to 2.25.4 in pom.xml (two locations), addressing two security vulnerabilities:

  1. CVE-2025-68161 (CVSS 6.3): TLS hostname verification missing in Socket Appender—attackers with MITM capability could intercept logs if the appender is used with TLS
  2. CVE-2026-34480: XML sanitization issue in XmlLayout leading to silent log drops when forbidden XML 1.0 characters appear in messages

The 8-version jump reflects accumulated security fixes across the stable v2 series since the project's last update (2.17.1 was released in Dec 2021; 2.25.4 is current).

What reviewers should know

What to check:

  • Does this codebase use log4j's Socket Appender with TLS? If so, the CVE-2025-68161 fix is critical. Check pom.xml and test configurations for appender setup.
  • Does any test logging produce XML output (XmlLayout)? Check if forbidden XML characters could appear in test logs/MDC values—the CVE-2026-34480 fix prevents silent drops.

No code changes: This is purely a dependency version update in two pom.xml sections. The large version jump is expected and safe—stable v2 releases maintain binary compatibility.

Testing note: This is a provided scope dependency, so actual behavior depends on the runtime environment. Ensure your test suites exercise logging if they depend on it.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback

@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented May 6, 2026

Copy link
Copy Markdown
Contributor

Renovate Jira issue ID: JAVASE-214

@sonar-review-alpha sonar-review-alpha 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.

Straightforward security upgrade. Both log4j-core declarations (annotation processor path at line 59, provided dependency at line 830) are correctly updated to 2.25.4. Version 2.25.4 covers both CVEs: CVE-2025-68161 (fixed in 2.25.3) and CVE-2026-34480 (fixed in 2.25.4). The dependency is provided scope throughout — it doesn't ship in the plugin artifact, so there is no runtime exposure in released artifacts.

🗣️ Give feedback

<version>2.25.4</version>
<scope>provided</scope>
</dependency>
<dependency>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The log4j-api artifact immediately below this point remains at 2.17.1 while log4j-core is now at 2.25.4. Neither CVE in this PR affects log4j-api, so there is no security gap. However, Apache Log4j recommends keeping the two artifacts at the same version within the same major line, and a future vulnerability scan could report a stale log4j-api independently. Bumping it to 2.25.4 here avoids that confusion.

  • Mark as noise

@sonarqube-next

sonarqube-next Bot commented May 6, 2026

Copy link
Copy Markdown

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@renovate renovate Bot changed the title Update dependency org.apache.logging.log4j:log4j-core to v2.25.4 [SECURITY] Update dependency org.apache.logging.log4j:log4j-core to v2.25.4 [SECURITY] - autoclosed May 8, 2026
@renovate renovate Bot closed this May 8, 2026
@renovate renovate Bot deleted the renovate/maven-org.apache.logging.log4j-log4j-core-vulnerability branch May 8, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants