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.
| Package | Affected versions | Patched versions |
|---|---|---|
io.pebbletemplates:pebble-projectMaven | < 3.1.4 | 3.1.4 |
Affected products
2- Pebble Templates/Pebble Templatesdescription
Patches
0No patches discovered yet.
Vulnerability mechanics
AI mechanics synthesis has not run for this CVE yet.
References
5- github.com/advisories/GHSA-83m8-7hj8-ff5wghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2019-19899ghsaADVISORY
- github.com/PebbleTemplates/pebble/issues/493ghsax_refsource_MISCWEB
- github.com/PebbleTemplates/pebble/pull/511ghsaWEB
- research.securitum.com/server-side-template-injection-on-the-example-of-pebbleghsaWEB
News mentions
0No linked articles in our index yet.