Vulnerability Type: Sandbox Bypass / Remote Code Execution
Affected Component: Jinjava
Affected Users: - Organizations using HubSpot's Jinjava template rendering engine for user-provided template content - Any system that renders untrusted Jinja templates using HubSpot's Jinjava implementation - Users with the ability to create or edit custom code templates
Severity: Critical - allows arbitrary Java class instantiation and file access bypassing built-in sandbox restrictions
Root Cause: Multiple security bypass vulnerabilities in Jinjava's sandbox mechanism:
ForTag Property Access Bypass: The ForTag class does not enforce JinjavaBeanELResolver restrictions when iterating over object properties using Introspector.getBeanInfo() and invoking getter methods via PropertyDescriptor.getReadMethod()
Restricted Class Instantiation: The sandbox's type allowlist can be bypassed by using ObjectMapper to instantiate classes through JSON deserialization, including creating new JinjavaELContext and JinjavaConfig instances
Attack Vector: An attacker with the ability to create or edit Jinja templates can:
- Access arbitrary getter methods on objects in the template context
- Instantiate ObjectMapper to enable default typing
- Create arbitrary Java classes by bypassing type allowlists
- Read files from the server filesystem (demonstrated with /etc/passwd)
- Potentially execute arbitrary code
Status: Patched - CVE-2026-25526
Users should upgrade to one of the following versions which contain fixes for this vulnerability:
Fix Components:
ForTag Security Hardening
ForTag.renderForCollection() to enforce JinjavaBeanELResolver restrictionsEnhanced Type Validation
JinjavaBeanELResolver.isRestrictedClass() to prevent instantiation of sensitive typesConfiguration Protection
JinjavaConfig or JinjavaELContext instances via ObjectMapperreadOnlyResolver configuration from untrusted templatesCollection Type Validation
HubLELResolver to prevent collection type wrapping bypassesObjectMapper Restrictions
ObjectMapper.enableDefaultTyping() to prevent enabling via less restrictive ELResolverInformation for Users: Upgrade to version 2.8.3 or 2.7.6 or later to address this vulnerability.
{
"github_reviewed": true,
"github_reviewed_at": "2026-02-03T17:52:55Z",
"severity": "CRITICAL",
"nvd_published_at": "2026-02-04T22:15:59Z",
"cwe_ids": [
"CWE-1336"
]
}