---
id: CVE-2026-84939
title: >-
  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 …
summary: >-
  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 …
severity: critical
cvss: 9.1
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N'
cwe:
  - CWE-23
  - CWE-22
vendor: apache
product: freemarker
affected:
  - 'freemarker >= 2.2, < 2.3.35'
patched:
  - freemarker 2.3.35
published: '2026-09-10'
updated: '2026-09-11'
sourceUpdated: '2026-09-11T13:06:56.423'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-84939'
references:
  - url: 'https://lists.apache.org/thread/hrd7o2ylwkkswdyhyzllgqt0f80kyd5y'
    label: security@apache.org
  - url: 'http://www.openwall.com/lists/oss-security/2026/09/08/2'
    label: af854a3a-2127-422b-91ae-364da2661108
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-84939.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-84939'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2531282'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-84939'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-84939'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-09-10T15:57:22.150692Z'
ingestedAt: '2026-09-14T09:49:55.044Z'
epss: 0.0083
epssPercentile: 0.55577
scores:
  nvd: 9.1
  vendor: 7.5
---

## Overview

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

- `freemarker >= 2.2, < 2.3.35`

## Remediation

Upgrade past the affected range:

- `freemarker 2.3.35`

## Vendor advisories

- **Red Hat VEX** · Important · affected: Red Hat build of Quarkus, Red Hat Single Sign-On 7, Exploit Intelligence · no fix planned: Red Hat build of Quarkus, Red Hat Single Sign-On 7 · updated 2026-09-21 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-84939.json)
