Every CVE Search/ Get API key

CVE-2025-23026

HTML templates containing Javascript template strings are subject to XSS in jte

6.1 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
Low
Privileges needed
None
User interaction
Required

What an attacker can affect

Confidentiality
Low
Integrity
Low
Availability
None

Exploit likelihood

0.30%Up 0.3 points since Jan 14, 2025
90%50%10%1%

What each source reports

CVE List Score used 6.1

HTML templates containing Javascript template strings are subject to XSS in jte

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.

Record
CVE-2025-23026
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-150
Updated
2026-11-02
EUVDEUVD-2025-0046 6.1

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.

Record
EUVD-2025-0046
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Updated
2026-11-03
GitHub AdvisoriesGHSA-vh22-6c6h-rm8q 6.1

jte's HTML templates containing Javascript template strings are subject to XSS

Summary

Jte HTML templates with script tags or script attributes that include a Javascript template string (backticks) are subject to XSS.

Details

The javaScriptBlock and javaScriptAttribute methods in the Escape class (source) 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.

PoC

  1. Use the Jte Gradle Plugin with the following code in src/jte/xss.jte:
    @param String someMessage
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>XSS Test</title>
        <script>window.someVariable = `${someMessage}`;</script>
    </head>
    <body>
    <h1>XSS Test</h1>
    </body>
    </html>
    
  2. Use the following Java code to demonstrate the XSS vulnerability:
    final StringOutput output = new StringOutput();
    JtexssGenerated.render(new OwaspHtmlTemplateOutput(output), null, "` + alert(`xss`) + `");
    renderHtml(output);
    

Impact

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.

Record
GHSA-vh22-6c6h-rm8q
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-150
Updated
2026-11-02
NVD 6.1

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.

Record
CVE-2025-23026
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-79, CWE-150
Updated
2026-11-02
OSV 6.1

HTML templates containing Javascript template strings are subject to XSS in jte

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.

Record
CVE-2025-23026
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-150, CWE-79
Updated
2026-11-02
OSVGHSA-vh22-6c6h-rm8q 6.1

jte's HTML templates containing Javascript template strings are subject to XSS

Summary

Jte HTML templates with script tags or script attributes that include a Javascript template string (backticks) are subject to XSS.

Details

The javaScriptBlock and javaScriptAttribute methods in the Escape class (source) 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.

PoC

  1. Use the Jte Gradle Plugin with the following code in src/jte/xss.jte:
    @param String someMessage
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <title>XSS Test</title>
        <script>window.someVariable = `${someMessage}`;</script>
    </head>
    <body>
    <h1>XSS Test</h1>
    </body>
    </html>
    
  2. Use the following Java code to demonstrate the XSS vulnerability:
    final StringOutput output = new StringOutput();
    JtexssGenerated.render(new OwaspHtmlTemplateOutput(output), null, "` + alert(`xss`) + `");
    renderHtml(output);
    

Impact

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.

Record
GHSA-vh22-6c6h-rm8q
CVSS 3.1
6.1 MediumCVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Weakness
CWE-150, CWE-79
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
gg.jte:jte
Maven
through 3.1.15
3.1.16
gg.jte:jte-runtime
Maven
through 3.1.15
3.1.16
gg.jte:jte
Maven
before 3.1.16, plus listed versions
1.0.01.1.01.10.01.11.01.11.1
Show 45 moreShow less
1.11.21.11.31.11.41.12.01.12.11.2.01.3.01.4.01.5.01.5.11.5.21.6.01.7.01.8.01.9.02.0.02.0.12.0.22.0.32.0.42.1.02.1.12.1.22.2.02.2.12.2.22.2.32.2.42.2.62.3.02.3.12.3.23.0.03.0.13.0.23.0.33.1.03.1.13.1.103.1.113.1.123.1.133.1.143.1.153.1.2
3.1.16
gg.jte:jte-runtime
Maven
before 3.1.16, plus listed versions
1.0.01.1.01.10.01.11.01.11.1
Show 45 moreShow less
1.11.21.11.31.11.41.12.01.12.11.2.01.3.01.4.01.5.01.5.11.5.21.6.01.7.01.8.01.9.02.0.02.0.12.0.22.0.32.0.42.1.02.1.12.1.22.2.02.2.12.2.22.2.32.2.42.2.62.3.02.3.12.3.23.0.03.0.13.0.23.0.33.1.03.1.13.1.103.1.113.1.123.1.133.1.143.1.153.1.2
3.1.16

History

History
RecordedChangedSources
aliasesEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2025-23026 is a medium vulnerability (CVSS 6.1) in Casid Jte, published January 13, 2025. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.30%, the 23rd percentile. Fixed in gg.jte:jte 3.1.16.

References

This page doesn't list everything

Left out here: 14 versions. The JSON record has them.

MoveEnter Open