CVE-2020-13936
Remote Code Execution vulnerability in org.apache.velocity:velocity-engine-parent

Remote Code Execution No known exploit

What is CVE-2020-13936 About?

Apache Velocity Engine versions up to 2.2 are vulnerable to remote code execution if an attacker can modify Velocity templates. This allows arbitrary Java code or system commands to be executed with the same privileges as the servlet container, posing a critical risk.

Affected Software

  • org.apache.velocity:velocity-engine-parent
    • <2.3
  • org.apache.velocity:velocity
    • <=1.7

Technical Details

Apache Velocity Engine versions up to 2.2 are susceptible to remote code execution (RCE) if an attacker gains the ability to modify or upload Velocity templates. The Velocity template engine allows for dynamic content generation, and its scripting capabilities, when exposed without proper sandboxing or restrictions, can be abused. Specifically, if an attacker can inject malicious code into a template, that code will be executed on the server when the template is rendered. This execution occurs with the privileges of the account running the servlet container, allowing for arbitrary Java code execution through template directives or direct system command execution, circumventing application security measures.

What is the Impact of CVE-2020-13936?

Successful exploitation may allow attackers to execute arbitrary code or system commands on the server, leading to complete system compromise, unauthorized data access, or denial of service.

What is the Exploitability of CVE-2020-13936?

Exploitation of this vulnerability requires an attacker to have the ability to modify or upload Velocity templates. This often implies some form of authenticated access or a prior vulnerability (e.g., file upload or directory traversal). The complexity of crafting malicious templates is low to moderate, given the powerful capabilities of Velocity. Authentication to modify templates is usually a prerequisite, making this primarily a privilege escalation or post-exploitation vulnerability, though it could be leveraged remotely if a template upload function is accessible. The risk factors that increase exploitation likelihood include applications allowing untrusted users to upload or modify templates, insufficient input validation on template content, or a lack of sandboxing for the Velocity engine.

What are the Known Public Exploits?

PoC Author Link Commentary
No known exploits

What are the Available Fixes for CVE-2020-13936?

Available Upgrade Options

  • org.apache.velocity:velocity-engine-parent
    • <2.3 → Upgrade to 2.3

Struggling with dependency upgrades?

See how Resolved Security's drop-in replacements make it simple.

Book a demo

Additional Resources

What are Similar Vulnerabilities to CVE-2020-13936?

Similar Vulnerabilities: CVE-2017-12613 , CVE-2018-13271 , CVE-2019-0193 , CVE-2020-1935 , CVE-2021-24713