Permissive Regular Expression Affecting @mathharo/promptcraft-sanitize package, versions >=0.1.0


Severity

Recommended
0.0
medium
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.05% (15th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-JS-MATHHAROPROMPTCRAFTSANITIZE-12515408
  • published5 Sept 2025
  • disclosed4 Sept 2025
  • creditAugusto César Perin

Introduced: 4 Sep 2025

NewCVE-2025-58353  (opens in a new tab)
CWE-625  (opens in a new tab)

How to fix?

There is no fixed version for @mathharo/promptcraft-sanitize.

Overview

@mathharo/promptcraft-sanitize is a Sanitizer fix for overlapping multi-token patterns.

Affected versions of this package are vulnerable to Permissive Regular Expression due to insufficient replacement of multi-character tokens. An attacker can execute arbitrary scripts in the context of the application by crafting input that exploits overlapping patterns in the input sanitization logic.

CVSS Base Scores

version 4.0
version 3.1