# CVE-2026-84939: Apache FreeMarker, Apache FreeMarker: A malformed locale may be exploitable for path traversal attacks

> Attackers can exploit malformed locale identifiers to perform path traversal attacks, potentially reading unauthorized files if localized lookup is enabled.

- **Severity:** Critical 9.1 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Sep 2026
- **Updated:** 10 Sep 2026
- **Also known as:** CLSA-2026-1791549508, CLSA-2026-1791957648, CLSA-2026-1791959281, CLSA-2026-1793128416, CLSA-2026-1793128508, CLSA-2026-1793128764, DEBIAN-CVE-2026-84939, ECHO-53f0-ac30-bbbb, GHSA-27j2-h3m2-8237, ROOT-APP-MAVEN-CVE-2026-84939, UBUNTU-CVE-2026-84939

## What is CVE-2026-84939?

CVE-2026-84939 is a critical path traversal vulnerability in Apache FreeMarker, published on 10 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

Path traversal vulnerability in Apache FreeMarker template loading mechanism, if the attacker can specify an arbitrary malformed locale identifier to FreeMarker, and the localized lookup configuration setting is enabled (it's by default enabled).

This issue affects Apache FreeMarker from 2.2.0 through 2.3.34.

Users are recommended to upgrade to version 2.3.35. Disabling localized lookup in previous versions also mitigates this.

Note that even in versions affected by this vulnerability, the files that can be loaded remain restricted by the TemplateLoader that FreeMarker is configured to use. In particular, FileTemplateLoader prevents attempts to traverse outside the baseDir specified in its constructor. Other TemplateLoader implementations may allow access outside their designated base directory, but they are still constrained by the underlying storage mechanism—for example, a loader wrapping a Java class loader can only access resources that the class loader can load, while one wrapping a web application context can only access resources available through that context.

Weakness: CWE-23 (Relative Path Traversal)

## Which versions are affected by CVE-2026-84939?

2 open source packages ship an affected version, including org.freemarker:freemarker. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.freemarker:freemarker` | Maven | From 2.2.0 | 2.3.35 |
| `org.freemarker:freemarker` | Maven | From 2.2.0 | 2.3.35 |

Products: Apache Freemarker.

## How do I fix CVE-2026-84939?

Upgrade org.freemarker:freemarker to 2.3.35 or later.

## Is CVE-2026-84939 being exploited?

There is no known exploitation of CVE-2026-84939 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-84939 and fix it if it is affected.

What it is: CVE-2026-84939 is a critical path traversal vulnerability in Apache FreeMarker, published on 10 Sep 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-84939 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.freemarker:freemarker (Maven): affected from 2.2.0; fixed in 2.3.35
- org.freemarker:freemarker (Maven): affected from 2.2.0; fixed in 2.3.35

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/CVE-2026-84939/ (Markdown: https://insights.sbomify.com/CVE-2026-84939/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-84939
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-84939
- OSV: https://osv.dev/vulnerability/CVE-2026-84939

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-84939/
Summaries are generated and may contain mistakes; the official description above is the record.
