Skip to content

Announce Log4j 2.25.x as a Long-Term Support release - #52

Open
ppkarwasz wants to merge 3 commits into
mainfrom
blog/log4j-2.25-lts
Open

ppkarwasz wants to merge 3 commits into
mainfrom
blog/log4j-2.25-lts

Conversation

@ppkarwasz

@ppkarwasz ppkarwasz commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Adds a blog post announcing 2.25.x as the Log4j LTS line: why users don't upgrade, the LTS rules, a note to library maintainers to depend on the lowest Log4j version they need, and what 2.25.6 changes with respect to sonatype-2026-006746.

The post uses a subtitle, so this PR also adds a partials/article.hbs override in antora-playbook.yaml: pages can set :page-subtitle: to render a subtitle below the title. Pages without the attribute render as before. Navigation, cross-references and the browser tab still show only the main title, so the blog index entry uses explicit link text.

Before merging

  • Wait for the 2.25.6 and 2.26.2 releases, which ship the deserialization hardening referenced in the last section.
  • Find a source for the 2.17.1/2.17.2 download figures before December 2025: November 2025 Maven Central download statistics (jar downloads) provided by Sonatype.
  • Update the date in the file name and in blog/index.adoc to the publication date.

🤖 Generated with Claude Code

Pages can set the `page-subtitle` attribute to render a subtitle below the
page title. The attribute does not change the document title, so navigation,
cross-references and the browser tab still show the main title only.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@garydgregory

Copy link
Copy Markdown
Member

I don't think we should maintain more than one 2.x release line.

Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
@ppkarwasz

Copy link
Copy Markdown
Member Author

The cost of an LTS 2.25.x release is a fraction of the maintenance cost of the 2.x release line. We only need to backport a couple of patches once in a while.

I volunteer to be the RM of this version until the end-of-support date and I only need two additional votes once a year or so.

@FreeAndNil FreeAndNil 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.

LGTM

@ramanathan1504 ramanathan1504 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.

Checked the deserialization section against the 2.25.5 jars and a build of fix/2.25.x/deserialization-hardening: the outer ObjectInputFilter / FilteredObjectInputStream description is exact, and the branch closes the gap.
The NOTE needs one fix: every serialized event breaks between 2.25.5 and 2.25.6 (the context map SortedArrayStringMap changes serialVersionUID), not only some classes. Plus a version slip (2.8 vs 2.8.2) and a misplaced playbook comment; the rest are nits.

Comment thread antora-playbook.yaml
Comment on lines 138 to +139
# Disable component version selector
# Adds support for an optional subtitle, set by the `page-subtitle` document attribute

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.

The new entry landed under the comment that belongs to nav-explore.hbs; keep only the subtitle comment here.

Suggested change
# Disable component version selector
# Adds support for an optional subtitle, set by the `page-subtitle` document attribute
# Adds support for an optional subtitle, set by the `page-subtitle` document attribute

Comment thread antora-playbook.yaml
<h1 class="page">{{{this}}}</h1>
{{/with}}
{{#with page.attributes.subtitle}}
<p class="subtitle">{{this}}</p>

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.

{{this}} escapes the raw attribute, so markup is not converted: Log4j `2.25.x` is a *Long-Term Support* release renders with literal backticks and asterisks; worth noting that the subtitle is plain text?

Comment thread antora-playbook.yaml
{{> pagination}}
</article>

- path: partials/nav-explore.hbs

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.

…and the comment goes back above the entry it describes.

Suggested change
- path: partials/nav-explore.hbs
# Disable component version selector
- path: partials/nav-explore.hbs


== Why users don't upgrade Log4j

This is why we understand users that never upgrade Log4j.

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.

Nit: "who" for people.

Suggested change
This is why we understand users that never upgrade Log4j.
This is why we understand users who never upgrade Log4j.

* We will maintain the `2.25.x` line at least until **June 2027** (two years from the `2.25.0` release),
and longer if our bandwidth permits.
* We only backport vulnerability fixes and other important bug fixes.
No new features, no deprecations, no behavior changes beyond what a fix requires.

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.

Is the SortedArrayStringMap format change (#4272) required by the fix? It is what breaks every serialized event (see the NOTE thread).

If you want to support our LTS effort, our xref:support.adoc#sponsorship[support page] lists the maintainers you can sponsor individually.

New features continue to land in our latest line (`2.26.x` at the time of writing),
which remains the recommended choice for users that want to stay on the latest version.

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.

Nit: same as L39.

Suggested change
which remains the recommended choice for users that want to stay on the latest version.
which remains the recommended choice for users who want to stay on the latest version.

The next LTS release, `2.25.6`, will fix https://guide.sonatype.com/vulnerability/sonatype-2026-006746[sonatype-2026-006746].

The advisory points to a real gap (not a vulnerability) in how Log4j classes deserialize themselves.
Since `2.8.2`, a serialized log event has carried its message inside a `java.rmi.MarshalledObject`,

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.

MarshalledObject arrived in 2.8 (LOG4J2-1226); 2.8.2 is when FilteredObjectInputStream was added.

Suggested change
Since `2.8.2`, a serialized log event has carried its message inside a `java.rmi.MarshalledObject`,
Since `2.8`, a serialized log event has carried its message inside a `java.rmi.MarshalledObject`,

Comment on lines +122 to +124
If your application uses Java serialization on Log4j classes, note that the serialized form of some classes
(e.g., `Log4jLogEvent` and `ParameterizedMessage`) changes in `2.25.6`:
data serialized by `2.25.5` or earlier cannot be deserialized by `2.25.6`, and vice versa.

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.

Every event breaks, not only some: the context map SortedArrayStringMap changes serialVersionUID, so 2.25.5 ↔ 2.25.6 fails before the message is read (checked both ways against the branch).

Suggested change
If your application uses Java serialization on Log4j classes, note that the serialized form of some classes
(e.g., `Log4jLogEvent` and `ParameterizedMessage`) changes in `2.25.6`:
data serialized by `2.25.5` or earlier cannot be deserialized by `2.25.6`, and vice versa.
If your application uses Java serialization on Log4j classes, note that the serialized form of
`Log4jLogEvent`, `SortedArrayStringMap`, `ParameterizedMessage` and `ObjectArrayMessage` changes in `2.25.6`:
log events serialized by `2.25.5` or earlier cannot be deserialized by `2.25.6`, and vice versa.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants