# GHSA-j7c3-96rf-jrrp: Critical vulnerability in log4j may affect generated PEAR projects

> Attackers can execute arbitrary code via Log4j in generated PEAR projects, requiring developers to upgrade the archetype or Log4j dependency.

- **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:** 16 Dec 2021

## What is GHSA-j7c3-96rf-jrrp?

GHSA-j7c3-96rf-jrrp is a code injection vulnerability in de.averbis.textanalysis:pear-archetype, published on 16 Dec 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

### Impact
UIMA PEAR projects that have been generated with the `de.averbis.textanalysis:pear-archetype ` version `2.0.0` have a maven dependency with scope `test` to` log4j 2.8.2` and might be affected by CVE-2021-44228.

### Patches
- The issue has been resolved in `de.averbis.textanalysis:pear-archetype ` version `2.0.1`. Please make sure to use `de.averbis.textanalysis:pear-archetype ` version >= `2.0.1` for generating new PEAR projects.

- Existing maven PEAR projects can be patched by manually upgrading to `log4j` >= `2.16.0` in `pom.xml`.

### References
https://www.lunasec.io/docs/blog/log4j-zero-day/

### For more information
If you have any questions or comments about this advisory:
* Open an issue in https://github.com/averbis/pear-archetype/issues

## Which versions are affected by GHSA-j7c3-96rf-jrrp?

2 open source packages ship an affected version, including de.averbis.textanalysis:pear-archetype.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `de.averbis.textanalysis:pear-archetype` | Maven | From 2.0.0 | 2.0.1 |
| `de.averbis.textanalysis:pear-archetype` | Maven | From 2.0.0 | 2.0.1 |

## How do I fix GHSA-j7c3-96rf-jrrp?

Upgrade de.averbis.textanalysis:pear-archetype to 2.0.1 or later.

## Is GHSA-j7c3-96rf-jrrp being exploited?

There is no known exploitation of GHSA-j7c3-96rf-jrrp in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-j7c3-96rf-jrrp and fix it if it is affected.

What it is: GHSA-j7c3-96rf-jrrp is a code injection vulnerability in de.averbis.textanalysis:pear-archetype, published on 16 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-j7c3-96rf-jrrp in the wild and no public exploit code.

Affected packages and fixed versions:
- de.averbis.textanalysis:pear-archetype (Maven): affected from 2.0.0; fixed in 2.0.1
- de.averbis.textanalysis:pear-archetype (Maven): affected from 2.0.0; fixed in 2.0.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-j7c3-96rf-jrrp/ (Markdown: https://insights.sbomify.com/GHSA-j7c3-96rf-jrrp/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-j7c3-96rf-jrrp

---
From sbomify Insights: https://insights.sbomify.com/GHSA-j7c3-96rf-jrrp/
Summaries are generated and may contain mistakes; the official description above is the record.
