ppkarwasz commented on issue #4425: URL: https://github.com/apache/logging-log4j2/issues/4425#issuecomment-6809509297
> [!NOTE] > # TLP:CLEAR > This is **not** a vulnerability in Log4j. There is no CVE, no embargo and no hidden report behind this issue: everything relevant is public, on this page, and can be shared without restriction. > [!CAUTION] > This is **not** how security issues are reported. Opening a public issue and publishing a working exploit lab *before* the maintainers have triaged anything would have exposed every user to an unfixed problem, had this been a real vulnerability. Real vulnerabilities go **privately** to [email protected], one finding per report, as described in [`SECURITY.adoc`](https://github.com/apache/logging-log4j2/blob/2.x/SECURITY.adoc) and in our [reporting guidelines](https://logging.apache.org/security.html#reporting). Read the [threat model](https://logging.apache.org/security.html#threat-common) and the [Security FAQ](https://logging.apache.org/security/faq.html) first. > > **Do not delete or blank out this issue.** Removing a public report does not undo it: it only turns a non-finding into a mystery and invites speculation about what was hidden, as happened with #4255. Copies of this issue and of the accompanying material are archived on the Wayback Machine: > > - [This issue](https://web.archive.org/web/20261111231145/https://github.com/apache/logging-log4j2/issues/4425) > - [Exploit lab repository](https://web.archive.org/web/20261111231328/https://github.com/vindeckyy/log4j-config-time-lookup-rce) > - [`DISCLOSURE.md`](https://web.archive.org/web/20261111231339/https://github.com/vindeckyy/log4j-config-time-lookup-rce/blob/HEAD/DISCLOSURE.md) > - [`lab/run_script_rce.sh`](https://web.archive.org/web/20261111231341/https://github.com/vindeckyy/log4j-config-time-lookup-rce/blob/HEAD/lab/run_script_rce.sh) This report describes documented, operator-controlled behavior, not a vulnerability in Log4j Core. Both scenarios require the operator to write a `${ctx:...}` lookup into the configuration: into a script attribute in the first case, into a layout pattern in the second. Under our [threat model](https://logging.apache.org/security.html#threat-common-sources-configuration), configuration is trusted and supplied by the operator, and choosing which sources may be interpolated into which attributes is the operator's responsibility. The threat model explicitly warns that values read from the thread context may contain user-provided data, such as HTTP headers. The report quotes the line that thread context values are untrusted, but leaves out the paragraph that assigns their use in configuration to the operator. On the details: - Resolving `${ctx:...}` against the thread context of the current thread when no log event is available is the documented behavior of the lookup in the [global context](https://logging.apache.org/log4j/2.x/manual/lookups.html#ContextMapLookup), not undefined behavior. Making it return `null` would remove a documented feature, not fix a vulnerability. - `${env:HOME}`, `${sys:user.name}` and `${java:version}` resolving at configuration time is the whole purpose of single-`$` substitution. Environment variables and system properties are trusted configuration sources, and no thread context data is involved in those examples. - To include thread context data in log output, use the [`%X{key}` pattern converter](https://logging.apache.org/log4j/2.x/manual/pattern-layout.html#converter-thread-context-map), as the manual already recommends. Reports in this class are among the most frequent we receive. They differ only in the attribute that receives the value: file names, network destinations, routing keys, script attributes, patterns. To stop answering them one by one, we are adding a dedicated Security FAQ entry in apache/logging-site#51. Once published, it will be at https://logging.apache.org/security/faq.html#untrusted-interpolation. Closing as not planned. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
