Cloudanix VulnDB

CVE-2023-1932

None

CVSS

—

EPSS

0.5%

Published

Feb 9, 2024

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A flaw in a popular Java data-checking library can let attackers slip harmful code into web pages that use the library, potentially stealing information from users who visit those pages.

Exploitation
Requires User Interaction
Attacker needs
Low Privilege
Complexity
Moderate
Impact
Data Exposure
Component
Library
Class
XSS
Remediation
Patch
Effort
Low
Patch risk
Low

What it actually does

SafeHTML sanitization in hibernate-validator fails to reject or neutralize certain invalid HTML constructs, permitting HTML injection that executes as script in the rendering context.

Why it matters to the business

Applications relying on hibernate-validator for input sanitization can expose users to script execution, resulting in stolen credentials, session takeover, or defacement without requiring user interaction beyond visiting a page containing the injected payload.

How an attack unfolds

An attacker supplies crafted input containing malformed HTML that bypasses the SafeHTML validator; the application later renders the stored or reflected value in a browser context, causing the browser to parse and execute the injected markup as JavaScript.

How to fix it

Upgrade hibernate-validator to commit a883dcd11d7f9d8bdd8a2069a54cddd9213051c6 or later release containing the fix; recompile and redeploy all dependent applications; review any custom SafeHTML configurations for equivalent issues.

How to confirm the fix worked

After upgrade, re-test previously vulnerable inputs with known bypass payloads to confirm they are now rejected; scan build artifacts for the updated commit hash and run the project's test suite focused on HTML sanitization cases.

Typical attack path

  1. Identify an input field or API endpoint validated by hibernate-validator SafeHTML
  2. Submit a payload with deliberately invalid HTML sequences that evade the sanitizer
  3. Trigger rendering of the persisted or returned value in a web page
  4. Browser executes the injected script, exfiltrating data or performing actions on behalf of the victim

How to detect it

Search application logs and web server access logs for requests containing unusual HTML tags or script fragments submitted to validated fields; inspect rendered pages or database records for unexpected script or markup that should have been stripped.

What your security team should do

  • Immediately inventory all applications using hibernate-validator and schedule upgrade to the fixed commit
  • Add automated dependency scanning to CI pipelines to prevent future vulnerable versions from being introduced
  • Review stored data that may contain previously injected payloads and sanitize or remove them
  • Monitor for XSS-related alerts in web application firewalls and browser consoles during testing

The record

[rendering of invalid html with SafeHTML leads to HTML injection and XSS]

Affected packages

Ecosystem Package Introduced Fixed
Maven org.hibernate.validator:hibernate-validator 0 6.2.0.Final
Maven org.hibernate:hibernate-validator 0 6.2.0.Final
Debian:11 libhibernate-validator-java 0 No fix
Debian:12 libhibernate-validator-java 0 No fix
Debian:13 libhibernate-validator-java 0 No fix
Ubuntu:16.04:LTS libhibernate-validator-java 0 No fix
Ubuntu:18.04:LTS libhibernate-validator-java 0 No fix
Ubuntu:20.04:LTS libhibernate-validator-java 0 No fix
Ubuntu:22.04:LTS libhibernate-validator-java 0 No fix
Ubuntu:24.04:LTS libhibernate-validator-java 0 No fix
Ubuntu:24.10 libhibernate-validator-java 0 No fix
Ubuntu:25.04 libhibernate-validator-java 0 No fix
Ubuntu:25.10 libhibernate-validator-java 0 No fix
Ubuntu:Pro:16.04:LTS libhibernate-validator-java 0 No fix
Ubuntu:Pro:18.04:LTS libhibernate-validator-java 0 No fix
Ubuntu:Pro:20.04:LTS libhibernate-validator-java 0 No fix