CVE-2026-84939: Apache FreeMarker: A malformed locale may be exploitable for path traversal attacks
Apache FreeMarker CVE-2026-84939 permits path traversal via a malformed locale in template loading; fixed in FreeMarker 2.3.35.
A path traversal vulnerability in Apache FreeMarker's template loading mechanism can be triggered when an attacker controls a malformed locale value. FreeMarker 2.2.0 through 2.3.34 are affected for both the org.freemarker:freemarker and freemarker-gae artifacts, while 2.3.35 is unaffected. No exploitation or CVSS details were included in the announcement.
- Malformed locale input in template loading can lead to path traversal
- Versions 2.2.0 through 2.3.34 affected; upgrade to 2.3.35
- Applies to freemarker and freemarker-gae Maven artifacts
Vulnerabilities mentionedAll →
| CVE | Vulnerability | CVSS | EPSS | Flags | Affected | Exposure | Published |
|---|---|---|---|---|---|---|---|
| CVE-2026-84939 | Path Traversal in Apache FreeMarker Localized Template Lookup (CVE-2026-84939) Apache FreeMarker is vulnerable to path traversal (CWE-23) in its template loading mechanism when the localized lookup configuration setting is enabled, which is the default. The flaw is triggered if an application allows an attacker to supply an arbitrary, malformed locale identifier to FreeMarker; the malformed locale can cause template loading to traverse outside the intended path. What an attacker gains depends on configuration: files that can be loaded remain restricted by the configured TemplateLoader — FileTemplateLoader already prevents traversal outside its baseDir, and loaders wrapping a class loader or web application context can only reach resources those mechanisms expose — but other loader configurations may allow access outside the designated base directory, potentially enabling unintended file or resource disclosure. Any application embedding Apache FreeMarker versions 2.2.0 through 2.3.34 that passes attacker-controlled locale values into template loading is affected, including downstream products that bundle the library. No public proof-of-concept, CISA KEV listing, or confirmed in-the-wild exploitation is known at this time. Do: Upgrade to Apache FreeMarker 2.3.35; as a mitigation on earlier versions, disable the localized lookup setting. Audit applications for code paths where user-supplied locale identifiers reach FreeMarker template loading, and review which TemplateLoader is configured to assess whether files outside the intended base directory can be reached. | 9.1 | <1% |
| masslikely millions of Java application deployments embed an affected FreeMarker version (library ubiquity estimate); exact count unknown |
Posted by Dániel Dékány on Sep 08 Affected versions: - Apache FreeMarker (org.freemarker:freemarker) 2.2.0 through 2.3.34 - Apache FreeMarker (org.freemarker:freemarker) 2.3.35 unaffected - Apache FreeMarker (org.freemarker:freemarker-gae) 2.2.0 through 2.3.34 - Apache FreeMarker (org.freemarker:freemarker-gae) 2.3.35 unaffected Description: Path traversal vulnerability in Apache FreeMarker template loading mechanism, if the attacker can specify an arbitrary malformed locale...
This source does not provide full text. Read it at seclists.org.