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.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
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
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 | 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 include Apache Freemarker.
How do I fix CVE-2026-84939?
Upgrade org.freemarker:freemarker to 2.3.35 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-84939 being exploited?
There is no known exploitation of CVE-2026-84939 in the wild and no public exploit code.
Sources
Also known as CLSA-2026-1791549508, CLSA-2026-1791957648, CLSA-2026-1791959281, CLSA-2026-1793128416, CLSA-2026-1793128508, CLSA-2026-1793128764 and 5 more.