GHSA-qv9r-c865-cp47
Fix: apache/logging-log4j2#4163GHSA-qv9r-c865-cp47 is a security vulnerability in org.apache.logging.log4j:log4j-api. O3 Security confirms whether GHSA-qv9r-c865-cp47 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
Apache Log4j API: Improper encoding of non-finite floating-point values during MapMessage JSON serialization
Real-World Exposure
org.apache.logging.log4j:log4j-api☕org.apache.logging.log4j:log4j-apiReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
Description
Improper encoding of non-finite floating-point values during MapMessage JSON serialization in Apache Log4j API produces output that is not valid JSON. This issue affects Apache Log4j API versions 2.13.1 through 2.25.4 and version 2.26.0.
The fix for CVE-2026-34481 did not cover all code paths: when a MapMessage contains a non-finite IEEE 754 value (NaN, Infinity, or -Infinity), MapMessage.asJson() emits the corresponding bare token. RFC 8259 does not permit these tokens, so a conformant parser rejects the resulting document.
The defect is reachable only when both of the following conditions hold:
- The application uses the message resolver https://logging.apache.org/log4j/2.x/manual/json-template-layout.html#event-template-resolver-message of JsonTemplateLayout or any other layout that relies on MapMessage.asJson() or MapMessage.getFormattedMessage(new String[]{"JSON"}).
- The application logs a MapMessage that contains an attacker-controlled floating-point value.
An attacker who can supply a non-finite value can cause the affected layout to emit malformed JSON, which may corrupt the enclosing log record or disrupt downstream log ingestion and parsing.
Users are advised to upgrade to Apache Log4j API 2.25.5 or 2.26.1, both of which emit RFC 8259-compliant JSON for non-finite values.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.apache.logging.log4j:log4j-api | ≥ 2.13.1&&< 2.25.5 | 2.25.5 |
| ☕Maven | org.apache.logging.log4j:log4j-api | ≥ 2.26.0&&< 2.26.1 | 2.26.1 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.logging.log4j:log4j-api. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update org.apache.logging.log4j:log4j-api to 2.25.5 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-qv9r-c865-cp47 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-qv9r-c865-cp47 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-qv9r-c865-cp47. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-qv9r-c865-cp47 in your dependencies?
O3 detects GHSA-qv9r-c865-cp47 across Maven dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.