Vulnerabilities in pkg:maven/org.freemarker/freemarker
PACKAGECVE-2026-84939 is a CRITICAL (CVSS 9.1) path traversal vulnerability (CWE-23: Relative Path Traversal) affecting Freemarker libraries in the Maven ecosystem. The issue involves apache freemarker template loading mechanism vulnerable to path traversal. Remediation is available by upgrading affected packages to version 2.3.35.
pkg:maven/org.freemarker/freemarker
Vulnerability advisories affecting package pkg:maven/org.freemarker/freemarker. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-27j2-h3m2-8237 | CVE-2026-84939 | CRITICAL | Apache FreeMarker template loading mechanism vulnerable to path traversal |
CVE-2026-84939 at a Glance
Security Impact
CVSS: 9.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N).
How to Fix CVE-2026-84939
To remediate this vulnerability, upgrade all affected Freemarker dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.35</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=org.freemarker
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2026-84939, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=org.freemarker
Analyze the terminal output to locate any version of Freemarker in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.3.35), your application is affected.
Note: The mvn dependency:tree -Dincludes=org.freemarker command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-23: Relative Path Traversal, where the product uses external input to construct a pathname that should be within a restricted directory, but it does not properly neutralize sequences such as ".." that can resolve to a location that is outside of that directory. In Freemarker, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-84939 Affected Freemarker Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.freemarker:freemarker
|
Maven |
≥ 2.2.0
< 2.3.35
|
2.3.35
|
References
Frequently Asked Questions
What is CVE-2026-84939?
Which Freemarker versions are affected?
What version fixes CVE-2026-84939?
Is freemarker affected?
What is the CVSS score of CVE-2026-84939?
What CWE is associated with CVE-2026-84939?
How can I check Maven dependencies for CVE-2026-84939?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-27j2-h3m2-8237",
"modified" : "2026-09-24T19:08:23Z",
"published" : "2026-09-10T06:31:45Z",
"aliases" : [ "CVE-2026-84939" ],
"summary" : "Apache FreeMarker template loading mechanism vulnerable to path traversal",
"details" : "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).\n\nThis issue affects Apache FreeMarker from 2.2.0 through 2.3.34.\n\nUsers are recommended to upgrade to version 2.3.35. Disabling localized lookup in previous versions also mitigates this.\n\nNote 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.freemarker:freemarker"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.2.0"
}, {
"fixed" : "2.3.35"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 2.3.34"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-84939"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/freemarker/commit/83953d9a9fa5a7c1fce3e39ff57182c19a34b5eb"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/freemarker"
}, {
"type" : "WEB",
"url" : "https://github.com/apache/freemarker/releases/tag/v2.3.35"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/hrd7o2ylwkkswdyhyzllgqt0f80kyd5y"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2026/09/08/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-23" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2026-09-24T19:08:23Z",
"nvd_published_at" : "2026-09-10T06:17:06Z"
}
}