Vulnerabilities in pkg:maven/gg.jte/jte
PACKAGECVE-2025-23026 is a MODERATE (CVSS 6.1) cross-site scripting vulnerability (CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences) affecting Jte libraries in the Maven ecosystem. The issue involves jte's html templates containing javascript template strings are subject to xss. Remediation is available by upgrading affected packages to version 3.1.16.
pkg:maven/gg.jte/jte
Vulnerability advisories affecting package pkg:maven/gg.jte/jte. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-vh22-6c6h-rm8q | CVE-2025-23026 | MODERATE | jte's HTML templates containing Javascript template strings are subject to XSS |
CVE-2025-23026 at a Glance
Security Impact
CVSS: 6.1
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N).
How to Fix CVE-2025-23026
To remediate this vulnerability, upgrade all affected Jte dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
<dependency>
<groupId>gg.jte</groupId>
<artifactId>jte</artifactId>
<version>3.1.16</version>
</dependency>
<dependency>
<groupId>gg.jte</groupId>
<artifactId>jte-runtime</artifactId>
<version>3.1.16</version>
</dependency>
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
mvn dependency:tree -Dincludes=gg.jte
How to Check if You Are Affected
To determine whether your Java application is affected by CVE-2025-23026, inspect your build dependencies using the Maven Dependency Plugin:
mvn dependency:tree -Dincludes=gg.jte
Analyze the terminal output to locate any version of Jte in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.1.16), your application is affected.
Note: The mvn dependency:tree -Dincludes=gg.jte command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-150: Improper Neutralization of Escape, Meta, or Control Sequences, where the product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could be interpreted as escape, meta, or control character sequences when they are sent to a downstream component. In Jte, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-23026 Affected Jte Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
gg.jte:jte
|
Maven |
< 3.1.16
|
3.1.16
|
|
gg.jte:jte-runtime
|
Maven |
< 3.1.16
|
3.1.16
|
References
Frequently Asked Questions
What is CVE-2025-23026?
Which Jte versions are affected?
What version fixes CVE-2025-23026?
Is jte affected?
Is jte-runtime affected?
What is the CVSS score of CVE-2025-23026?
What CWE is associated with CVE-2025-23026?
How can I check Maven dependencies for CVE-2025-23026?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vh22-6c6h-rm8q",
"modified" : "2025-01-13T21:49:25Z",
"published" : "2025-01-13T16:57:59Z",
"aliases" : [ "CVE-2025-23026" ],
"summary" : "jte's HTML templates containing Javascript template strings are subject to XSS",
"details" : "### Summary\nJte HTML templates with `script` tags or script attributes that include a Javascript template string (backticks) are subject to XSS.\n\n### Details\nThe `javaScriptBlock` and `javaScriptAttribute` methods in the `Escape` class ([source](https://github.com/casid/jte/blob/main/jte-runtime/src/main/java/gg/jte/html/escape/Escape.java#L43-L83)) do not escape backticks, which are used for Javascript [template strings](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#description). Dollar signs in template strings should also be escaped as well to prevent undesired interpolation.\n\n### PoC\n1. Use the [Jte Gradle Plugin](https://jte.gg/gradle-plugin/) with the following code in `src/jte/xss.jte`:\n ```html\n @param String someMessage\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <title>XSS Test</title>\n <script>window.someVariable = `${someMessage}`;</script>\n </head>\n <body>\n <h1>XSS Test</h1>\n </body>\n </html>\n ```\n2. Use the following Java code to demonstrate the XSS vulnerability:\n ```java\n final StringOutput output = new StringOutput();\n JtexssGenerated.render(new OwaspHtmlTemplateOutput(output), null, \"` + alert(`xss`) + `\");\n renderHtml(output);\n ```\n\n### Impact\nHTML 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.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "gg.jte:jte"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.16"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.15"
}
}, {
"package" : {
"ecosystem" : "Maven",
"name" : "gg.jte:jte-runtime"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "3.1.16"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 3.1.15"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/casid/jte/security/advisories/GHSA-vh22-6c6h-rm8q"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-23026"
}, {
"type" : "WEB",
"url" : "https://github.com/casid/jte/commit/a6fb00d53c7b8dbb86de933215dbe1b9191a57f1"
}, {
"type" : "WEB",
"url" : "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Template_literals#description"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/casid/jte"
}, {
"type" : "WEB",
"url" : "https://github.com/casid/jte/blob/main/jte-runtime/src/main/java/gg/jte/html/escape/Escape.java#L43-L83"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-150", "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-01-13T16:57:59Z",
"nvd_published_at" : "2025-01-13T20:15:30Z"
}
}