The Apache Logging Services PMC is receiving a growing number of private
questions about the Sonatype advisory sonatype-2026-006746, which flags
all Log4j API versions with a critical "Remote Code Execution" rating.
To answer them once, in public, we are publishing our analysis of it.

  Advisory: https://guide.sonatype.com/vulnerability/sonatype-2026-006746
  Publisher: Sonatype (not the Apache Logging Services PMC)
  Disposition: NOT A VULNERABILITY -- works as designed; no CVE
  TLP:CLEAR (this message may be redistributed without restriction)


== In short ==

Log4j contains internal classes that implement functionality the library
needs for itself: a timestamp formatter, a JSON parser, a string
interpolator, a deserialization filter, and so on. Some of them are
public for technical reasons only. They are not part of the public API,
they are not meant to be used by applications, and they are not designed
to be secure beyond the way Log4j itself uses them. Applications that
need such functionality should use a library written for that purpose.

`FilteredObjectInputStream` is one of these classes.
sonatype-2026-006746 describes what happens when an application uses it
to deserialize attacker-controlled data: the same thing that happens
with the JDK's own `ObjectInputStream`.


== Origin of the advisory ==

On August 24th, 2026, a public issue was opened on the Log4j issue
tracker (#4255), claiming an unpatched remote code execution in Log4j
through a `java.rmi.MarshalledObject` bypass of
`FilteredObjectInputStream`. The behavior it described is a known
non-finding, documented in our Security FAQ.

Two days later the reporter retracted the issue by removing its content.
Neither the PMC nor the ASF edited or deleted it. Several articles
nevertheless interpreted the retraction as an attempt to hide a
vulnerability. Sonatype published sonatype-2026-006746 to answer the
questions its customers raised about issue #4255.


== What the advisory describes ==

The technical content of the advisory is accurate. It is well known that
passing an attacker-controlled stream to `java.io.ObjectInputStream`, a
JDK class, can lead to arbitrary code execution; Oracle's own
documentation describes deserialization of untrusted data as inherently
dangerous. The advisory shows that passing the same attacker-controlled
stream to `org.apache.logging.log4j.util.FilteredObjectInputStream`, a
subclass of `ObjectInputStream` in an internal package of `log4j-api`,
can lead to the same result.


== PMC assessment ==

The PMC does not consider this a vulnerability in Log4j, because:

1. `FilteredObjectInputStream` is an internal class of `log4j-api`. It
is not part of the API that Log4j exposes to users.

2. It is unreachable unless the application itself deserializes data,
using `ObjectInputStream` or `FilteredObjectInputStream`. Log4j does not
deserialize data from any source as part of its normal operation.

3. We have found no evidence of its use in publicly available code,
other than Log4j's own TCP and UDP socket servers, which were removed in
Log4j 2.9.0 (2017).

This matches our threat model and the deserialization entry of our
Security FAQ, which have documented this position since before the
advisory was published.


== PMC plans ==

For Log4j, `FilteredObjectInputStream` is dead code. We cannot rule out,
however, that some software uses it to deserialize *trusted* data, and
we do not break user code unless it is necessary. The class will
therefore not be removed from Log4j 2.

Log4j 2.25.6 and 2.26.2 are planned to ship a series of changes, tracked
in discussion #4168 and concluded by PR #4274, that simplify the Log4j
deserialization code and define `FilteredObjectInputStream` precisely as
an `ObjectInputStream` with filtering by class name. No other filtering
is applied, which puts its behavior on par with the JDK's
`ObjectInputStream`.

These changes do not make `FilteredObjectInputStream` suitable for
untrusted data, and we do not recommend using it at all. Applications
that use it should migrate to the JDK's `ObjectInputStream`, combined
with an `ObjectInputFilter` (or the `jdk.serialFilter` system property)
when the data is not trusted. `FilteredObjectInputStream` offers no
advantage over this: trusted data does not need its filtering, and
untrusted data needs the same additional filters in both cases, for
example a limit on the size of deserialized arrays.


== What users should do ==

If your scanner reports sonatype-2026-006746 against `log4j-api`, check
whether your own code deserializes untrusted data. If it does not, the
finding does not apply to you. If it does, the issue lies in that code,
not in Log4j, and upgrading Log4j will not fix it.

Questions about the content or the score of the advisory should be
addressed to Sonatype, which published it.


== References ==

  Security FAQ, Deserialization of untrusted data:
    https://logging.apache.org/security/faq.html#deserialization
  Threat model:
    https://logging.apache.org/security.html
  Issue #4255:
    https://github.com/apache/logging-log4j2/issues/4255
  Deserialization hardening discussion:
    https://github.com/apache/logging-log4j2/discussions/4168
  PR #4274:
    https://github.com/apache/logging-log4j2/pull/4274
  Sonatype blog post on the issue:

https://www.sonatype.com/blog/a-reported-log4j-rce-is-more-complicated-than-it-looks

Questions and follow-up are welcome on this list or GitHub Discussions.

On behalf of the Apache Logging Services PMC,
Piotr P. Karwasz

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to