CVE-2026-84939 is a critical-severity (CVSS 9.1) CWE-23 vulnerability in org.freemarker:freemarker. A fix is available for org.freemarker:freemarker — see the affected versions and patch details below.
Apache FreeMarker template loading mechanism vulnerable to path traversal
EPSS Exploitation Probability
Probability of exploitation in the next 30 days, from FIRST.org EPSS.
How urgent is this, really
CVE-2026-84939 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.
Where this sits among everything scored
Of 395,492 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.
Real-World Exposure
org.freemarker:freemarkerReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.
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.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| ☕Maven | org.freemarker:freemarker | ≥ 2.2.0&&< 2.3.35 | 2.3.35org.freemarker:freemarker:2.3.35 |
Affected Products
freemarkerapacheDetection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.freemarker:freemarker, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
Fix
Update org.freemarker:freemarker to 2.3.35 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2026-84939 is resolved across your whole dependency graph.
Workarounds
Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.
Fixing This On Your OS
If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.
This is an Important path traversal vulnerability in Apache FreeMarker, affecting Red Hat JBoss Fuse, Red Hat Build of Keycloak, and Red Hat Single Sign-On. An attacker can exploit this flaw by providing a malformed locale identifier when localized lookup is enabled by default, potentially accessing restricted files.…
To mitigate this vulnerability, disable the localized lookup configuration setting within your Apache FreeMarker deployment. This setting is enabled by default and its deactivation prevents the processing of malformed locale identifiers that could lead to path traversal. Consult your application's documentation for specific instructions on how to configure FreeMarker to disable localized lookup. A restart of the affected application or service will be required for the changes to take effect. Disabling localized lookup may impact applications that rely on this feature for internationalization.Source: Red Hat security advisory for CVE-2026-84939 (CC BY 4.0)
| Product | Fixed in | Advisory |
|---|---|---|
| Red Hat build of Quarkus 3.27.6.redhat | org.freemarker/freemarker:2.3.35 | RHSA-2026:83082 |
| Red Hat build of Quarkus 3.33.4.redhat | org.freemarker/freemarker:2.3.35 | RHSA-2026:83520 |
Frequently Asked Questions
Is CVE-2026-84939 in your dependencies?
Find it across Maven, including transitive dependencies.