org.freemarker:freemarker@2.3.26-incubating

  • latest version

    2.3.35

  • latest non vulnerable version

  • first published

    10 years ago

  • latest version published

    1 months ago

  • licenses detected

  • package registry

  • Direct Vulnerabilities

    Known vulnerabilities in the org.freemarker:freemarker package. This does not include vulnerabilities belonging to this package’s dependencies.

    Fix vulnerabilities automatically

    Snyk's AI Trust Platform automatically finds the best upgrade path and integrates with your development workflows. Secure your code at zero cost.

    Fix for free
    VulnerabilityVulnerable Version
    • M
    Relative Path Traversal

    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.

    How to fix Relative Path Traversal?

    Upgrade org.freemarker:freemarker to version 2.3.35 or higher.

    [2.2.0,2.3.35)
    • H
    Server-side Template Injection (SSTI)

    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 Server-side Template Injection (SSTI). By allowing user input into java.security.ProtectionDomain.getClassLoader, templates will get access to the java classloader. This can be further leveraged for file system access and code execution. A low-privileged user is sufficient for exploitation of this vulnerability.

    How to fix Server-side Template Injection (SSTI)?

    Upgrade org.freemarker:freemarker to version 2.3.30 or higher.

    [,2.3.30)