CVE-2025-57351 ts-fns has prototype pollution vulnerability

Medium 6.5 Published Updated

Attackers can inject properties into the global prototype via the assign function, potentially causing crashes, unexpected code execution, or security bypasses.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
None listed

What is CVE-2025-57351?

CVE-2025-57351 is a medium-severity code injection vulnerability in n/a, published on 24 Sep 2025. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official description

A prototype pollution vulnerability exists in the ts-fns package versions prior to 13.0.7, where insufficient validation of user-provided keys in the assign function allows attackers to manipulate the Object.prototype chain. By leveraging this flaw, adversaries may inject arbitrary properties into the global object's prototype, potentially leading to application crashes, unexpected code execution behaviors, or bypasses of security-critical validation logic dependent on prototype integrity. The vulnerability stems from improper handling of deep property assignment operations within the library's public API functions. This issue remains unaddressed in the latest available version.

Weakness: CWE-1321

Which versions are affected by CVE-2025-57351?

2 open source packages ship an affected version, including ts-fns.

PackageAffectedFixed in
ts-fns npmAll versions to 13.1.3None
ts-fns npmAll versions to 13.1.3None

How do I fix CVE-2025-57351?

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

Upgrade, and never evaluate templates, expressions or code built from user input. More about Code injection.

Is CVE-2025-57351 being exploited?

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

Sources

Also known as GHSA-g7wq-wggw-vmhg.

Is CVE-2025-57351 in your software?

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

Check your SBOMs for free