Advisory Database
  • Advisories
  • Dependency Scanning
  1. maven
  2. ›
  3. com.hubspot.jinjava/jinjava
  4. ›
  5. CVE-2026-25526

CVE-2026-25526: JinJava Bypass through ForTag leads to Arbitrary Java Execution

February 3, 2026

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:

  1. 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()

  2. 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

References

  • github.com/HubSpot/jinjava
  • github.com/HubSpot/jinjava/commit/3d02e504d8bbb13bf3fe019e9ca7b51dfce7a998
  • github.com/HubSpot/jinjava/commit/c7328dce6030ac718f88974196035edafef24441
  • github.com/HubSpot/jinjava/releases/tag/jinjava-2.7.6
  • github.com/HubSpot/jinjava/releases/tag/jinjava-2.8.3
  • github.com/HubSpot/jinjava/security/advisories/GHSA-gjx9-j8f8-7j74
  • github.com/advisories/GHSA-gjx9-j8f8-7j74
  • nvd.nist.gov/vuln/detail/CVE-2026-25526

Code Behaviors & Features

Detect and mitigate CVE-2026-25526 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 2.7.6, all versions starting from 2.8.0 before 2.8.3

Fixed versions

  • 2.8.3
  • 2.7.6

Solution

Upgrade to versions 2.7.6, 2.8.3 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-1336: Improper Neutralization of Special Elements Used in a Template Engine

Source file

maven/com.hubspot.jinjava/jinjava/CVE-2026-25526.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 04 Feb 2026 00:36:37 +0000.