Remediation:
Upgrade to org.freemarker:freemarker@2.3.35.
Overview
org.freemarker:freemarker is a "template engine"; a generic tool to generate text output (anything from HTML to auto generated source code) based on templates.
Affected versions of this package are vulnerable to Relative Path Traversal through the ClassTemplateLoader and WebappTemplateLoader template-loading paths. An attacker can force loading of templates outside the intended base package or webapp subdirectory by supplying a malformed locale or template name that backs out with .. segments, causing FreeMarker to resolve unintended resources during localized lookup. This can let the attacker read templates or other loader-backed resources the configured TemplateLoader can reach, breaking application rendering and exposing content that should not be selected by template lookup.
Workarounds
Disable localized lookup in FreeMarker configurations that are still on affected versions; this prevents the malformed-locale path traversal from being exercised during template lookup.
Remediation
Upgrade org.freemarker:freemarker to version 2.3.35 or higher.