# GHSA-94g7-hpv8-h9qm: Remote code injection in Log4j

> Attackers can execute arbitrary code by logging untrusted data in vulnerable Log4j versions via the Splunk Java logging library.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 14 Dec 2021

## What is GHSA-94g7-hpv8-h9qm?

GHSA-94g7-hpv8-h9qm is a code injection vulnerability in com.splunk.logging:splunk-library-javalogging, published on 14 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
Logging untrusted or user controlled data with a vulnerable version of Log4J may result in Remote Code Execution (RCE) against your application. This includes untrusted data included in logged errors such as exception traces, authentication failures, and other unexpected vectors of user controlled input.

More Details:
https://github.com/advisories/GHSA-jfh8-c2jp-5v3q

### Patches
Version 1.11.1 of the Splunk Logging for Java library.

There is also a backport to version 1.6.2 released as a patch: 1.6.2-0-0.

### Workarounds
If upgrading is not possible, then ensure the -Dlog4j2.formatMsgNoLookups=true system property is set on both client- and server-side components.

### References
https://github.com/advisories/GHSA-jfh8-c2jp-5v3q

### For more information
If you have any questions or comments about this advisory:
* Open an issue in https://github.com/splunk/splunk-library-javalogging/issues
* Email us at [devinfo@splunk.com](mailto:devinfo@splunk.com)

## Which versions are affected by GHSA-94g7-hpv8-h9qm?

4 open source packages ship an affected version, including com.splunk.logging:splunk-library-javalogging.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.splunk.logging:splunk-library-javalogging` | Maven | All versions | 1.6.2-0-0 |
| `com.splunk.logging:splunk-library-javalogging` | Maven | All versions | 1.6.2-0-0 |
| `com.splunk.logging:splunk-library-javalogging` | Maven | From 1.7.0 | 1.11.1 |
| `com.splunk.logging:splunk-library-javalogging` | Maven | From 1.7.0 | 1.11.1 |

## How do I fix GHSA-94g7-hpv8-h9qm?

Upgrade com.splunk.logging:splunk-library-javalogging to a fixed version for your release line: 1.6.2-0-0 or 1.11.1.

## Is GHSA-94g7-hpv8-h9qm being exploited?

There is no known exploitation of GHSA-94g7-hpv8-h9qm in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-94g7-hpv8-h9qm and fix it if it is affected.

What it is: GHSA-94g7-hpv8-h9qm is a code injection vulnerability in com.splunk.logging:splunk-library-javalogging, published on 14 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of GHSA-94g7-hpv8-h9qm in the wild and no public exploit code.

Affected packages and fixed versions:
- com.splunk.logging:splunk-library-javalogging (Maven): affected all versions; fixed in 1.6.2-0-0
- com.splunk.logging:splunk-library-javalogging (Maven): affected all versions; fixed in 1.6.2-0-0
- com.splunk.logging:splunk-library-javalogging (Maven): affected from 1.7.0; fixed in 1.11.1
- com.splunk.logging:splunk-library-javalogging (Maven): affected from 1.7.0; fixed in 1.11.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-94g7-hpv8-h9qm/ (Markdown: https://insights.sbomify.com/GHSA-94g7-hpv8-h9qm/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-94g7-hpv8-h9qm

---
From sbomify Insights: https://insights.sbomify.com/GHSA-94g7-hpv8-h9qm/
Summaries are generated and may contain mistakes; the official description above is the record.
