The Apache Logging Services PMC has received the security report
referenced below. After analysis, we classified it as INVALID (works as
designed). In the interest of transparency, and so that the community
and other researchers can benefit from the analysis, we are disclosing a
summary of it.

  Report reference: public GitHub issue, opened 24 October 2026
    https://github.com/apache/logging-log4j2/issues/4425
  Disposition: INVALID -- works as designed; no CVE
  TLP:CLEAR (this message may be redistributed without restriction)

The report was filed publicly, together with a public exploit lab,
before any triage. The reporter was informed of this classification on
the issue itself.


== Summary of the report ==

When Log4j Core loads or reloads its configuration, it substitutes
lookups in configuration attributes without a log event. In that
context, the `${ctx:...}` lookup reads the thread context of the thread
performing the (re)configuration. The reporter argued that, since our
threat model does not trust thread context values, an application that
stores request data in the thread context before a (re)configuration
lets that data flow into the configuration: into a script attribute,
leading to code execution if scripting is enabled, or into a layout
pattern, where the resolved value stays until the next reconfiguration.
The reporter proposed that `ContextMapLookup` always return `null` when
no log event is available.


== PMC assessment ==

This is NOT a vulnerability. Both scenarios require the operator to
write a `${ctx:...}` lookup into the configuration. Configuration is
trusted and supplied by the operator, and our threat model makes the
operator responsible for using only trusted sources in interpolation,
warning explicitly that thread context values may contain user-provided
data such as HTTP headers:

https://logging.apache.org/security.html#threat-common-sources-configuration

The report quotes the sentence of the threat model stating that thread
context values are untrusted, but omits the one assigning their use in
configuration to the operator. Log4j cannot make this decision on the
operator's behalf: only the application knows which thread context keys
hold trusted values.

Resolving `${ctx:...}` against the current thread when no log event is
available is the documented behavior of the lookup in the global
context, so the proposed change would remove a documented feature rather
than fix a vulnerability:

https://logging.apache.org/log4j/2.x/manual/lookups.html#ContextMapLookup

The other examples in the report (`${env:HOME}`, `${sys:user.name}`,
`${java:version}` resolved at configuration time) involve no thread
context data at all: they are trusted configuration sources, and
resolving them is the purpose of configuration-time substitution.

For researchers, the boundary that remains in scope is the following:
Log4j Core evaluates an interpolation expression at most once in each
evaluation context (once at configuration time and, for attributes
evaluated per log event, once at runtime), and does not evaluate the
result of a lookup again within the same context. A way to break this
rule would be in scope; CVE-2021-45046 and CVE-2021-45105 were of this kind.

This is the latest of many reports in the same class since December
2021. They differ only in the configuration attribute receiving the
value: file names (path traversal), host names and ports (connections to
arbitrary destinations), routing keys of the Routing appender (unbounded
creation of appenders), script attributes and layout patterns. Since
December 2025 alone we have answered ten private reports of this kind,
received through YesWeHack and by e-mail, all with the same answer. To
stop answering them one by one, we are adding a dedicated entry to our
Security FAQ:

https://github.com/apache/logging-site/pull/51

Once published, it will be available at:

https://logging.apache.org/security/faq.html#untrusted-interpolation

Recommendations for users:

- use thread context lookups only with keys whose values your
application generates or validates before calling `ThreadContext.put`;
- to include thread context data in the log output, use the `%X{key}`
pattern converter (or the equivalent field of a structured layout)
instead of a `${ctx:key}` lookup;
- do not interpolate untrusted sources into attributes that select a
destination or execute code: file names, host names, ports, routing keys
and script attributes.

Finally, we remind researchers that public issues are not a supported
channel for security reports, and that publishing an exploit before
triage puts users at risk if the issue turns out to be real. Please
follow the instructions at
https://logging.apache.org/security.html#reporting and e-mail
[email protected].


== References ==

  Threat model:
    https://logging.apache.org/security.html
  Public report:
    https://github.com/apache/logging-log4j2/issues/4425
  Security FAQ, path traversal:
    https://logging.apache.org/security/faq.html#path-traversal
  New Security FAQ entry (pending):
    https://github.com/apache/logging-site/pull/51
  Routing appender security documentation:
    https://github.com/apache/logging-log4j2/issues/4181

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