CVE-2025-58353 Promptcraft Forge Studio: Complete Sanitizer Bypass Enables XSS via Overlapping Patterns

High 8.2 Published Updated

Attackers can bypass regex sanitizers in Promptcraft Forge Studio to inject malicious scripts, leading to cross-site scripting attacks.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
None listed

What is CVE-2025-58353?

CVE-2025-58353 is a high-severity cross-site scripting vulnerability in MarceloTessaro promptcraft-forge-studio, published on 4 Sep 2025. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Promptcraft Forge Studio is a toolkit for evaluating, optimizing, and maintaining LLM-powered applications. All versions of Promptcraft Forge Studio sanitize user input using regex blacklists such as r`eplace(/javascript:/gi, '')`. Because the package uses multi-character tokens and each replacement is applied only once, removing one occurrence can create a new dangerous token due to overlap. The “sanitized” value may still contain an executable payload when used in href/src (or injected into the DOM). There is currently no fix for this issue.

Weakness: CWE-79, CWE-20, CWE-184

Which versions are affected by CVE-2025-58353?

How do I fix CVE-2025-58353?

No fix has been published for CVE-2025-58353 yet. Limit exposure of the affected software until one is available.

Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.

Is CVE-2025-58353 being exploited?

There is no known exploitation of CVE-2025-58353 in the wild and no public exploit code.

Sources

Is CVE-2025-58353 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free