VYPR
Critical severityNVD Advisory· Published Dec 18, 2019· Updated Aug 5, 2024

CVE-2019-19899

CVE-2019-19899

Description

Pebble Templates 3.1.2 allows sandbox bypass via Class.forName(Module,String) to access Java classes.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Pebble Templates 3.1.2 allows sandbox bypass via Class.forName(Module,String) to access Java classes.

Vulnerability

Overview

CVE-2019-19899 describes a bypass in Pebble Templates version 3.1.2 of a protection mechanism intended to block access to instances of java.lang.Class. The root cause is that the getClass method remains accessible through the public static signature java.lang.Class.forName(java.lang.Module, java.lang.String), despite previous fixes for similar issues [1][4]. This allows attackers to circumvent the sandbox restrictions.

Exploitation

An attacker who can inject malicious templates can exploit this vulnerability by calling Class.forName with a Module object obtained via template expressions. For example, using the Pebble templating language, one can execute: {%set daInt = (1).TYPE.protectiondomain().getPermissions.elementsAsStream.findFirst().get.hashCode.TYPE.getModule %}{{(1).TYPE.protectiondomain().getPermissions.elementsAsStream.findFirst().get.hashCode.TYPE.forName(daInt,'java.lang.Runtime') }}, which returns the Runtime class [4]. This demonstrates the ability to instantiate arbitrary classes.

Impact

Successful exploitation allows attackers to bypass the sandbox and access any Java class, including java.lang.Runtime, which can lead to remote code execution or other severe security consequences. The vulnerability affects Pebble Templates before version 3.1.4.

Mitigation

The issue has been addressed in Pebble Templates version 3.1.4, which replaces the previous allowUnsafeMethod flag with a configurable Method Access Validator interface [3]. Users are advised to upgrade to 3.1.4 or later to mitigate the vulnerability.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
io.pebbletemplates:pebble-projectMaven
< 3.1.43.1.4

Affected products

2

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

5

News mentions

0

No linked articles in our index yet.