{"id":"CVE-2025-23026","published":"2025-01-13T19:36:03Z","modified":"2025-01-13T20:08:54Z","title":"HTML templates containing Javascript template strings are subject to XSS in jte","vendor":"casid","product":"jte","tier":"tail","description":{"text":"jte (Java Template Engine) is a secure and lightweight template engine for Java and Kotlin. In affected versions Jte HTML templates with `script` tags or script attributes that include a Javascript template string (backticks) are subject to XSS. The `javaScriptBlock` and `javaScriptAttribute` methods in the `Escape` class do not escape backticks, which are used for Javascript template strings. Dollar signs in template strings should also be escaped as well to prevent undesired interpolation. HTML templates rendered by Jte's `OwaspHtmlTemplateOutput` in versions less than or equal to `3.1.15` with `script` tags or script attributes that contain Javascript template strings (backticks) are vulnerable. Users are advised to upgrade to version 3.1.16 or later to resolve this issue. There are no known workarounds for this vulnerability.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.1,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00587,"percentile":0.42023,"provenance":"source"},"cwes":[{"id":"CWE-79","name":"Improper Neutralization of Input During Web Page Generation"},{"id":"CWE-150","name":"Improper Neutralization of Escape, Meta, or Control Sequences"}],"references":[{"url":"https://github.com/casid/jte/security/advisories/GHSA-vh22-6c6h-rm8q","tags":["x_refsource_CONFIRM"]},{"url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#description","tags":["x_refsource_MISC"]},{"url":"https://github.com/casid/jte/blob/main/jte-runtime/src/main/java/gg/jte/html/escape/Escape.java#L43-L83","tags":["x_refsource_MISC"]}],"priority":{"score":12.7,"factors":[{"name":"EPSS percentile","points":8.4},{"name":"CVSS severity","points":4.27}]},"vendorSlug":"casid","affectedVersions":[{"vendor":"casid","product":"jte","versions":["< 3.1.16"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-01-13T20:08:50.487263Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Maven","package":"gg.jte:jte","vulnerableRanges":["<3.1.16"],"patched":["3.1.16"],"from":["GHSA-vh22-6c6h-rm8q"],"provenance":"source"},{"ecosystem":"Maven","package":"gg.jte:jte-runtime","vulnerableRanges":["<3.1.16"],"patched":["3.1.16"],"from":["GHSA-vh22-6c6h-rm8q"],"provenance":"source"}],"summary":{"text":"The flaw is in the Escape class of casid's jte (Java Template Engine), specifically in its javaScriptBlock and javaScriptAttribute methods, which fail to escape backticks and dollar signs in JavaScript template strings within HTML templates rendered by OwaspHtmlTemplateOutput. An attacker who can get input into such a template, with the user interacting with the page (for example by following a link), can execute script in the victim's browser in a cross-site scripting attack, provided no workaround is applied and the affected version of jte is in use.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T22:08:46Z"},"euvd":{"id":"EUVD-2025-0046","exploited":false,"provenance":"source"}}