Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. ts-fns
  4. ›
  5. CVE-2025-57351

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

September 24, 2025 (updated September 25, 2025)

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.

References

  • github.com/VulnSageAgent/PoCs/tree/main/JavaScript/prototype-pollution/CVE-2025-57351
  • github.com/advisories/GHSA-g7wq-wggw-vmhg
  • github.com/tangshuang/ts-fns
  • github.com/tangshuang/ts-fns/issues/36
  • nvd.nist.gov/vuln/detail/CVE-2025-57351

Code Behaviors & Features

Detect and mitigate CVE-2025-57351 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 13.1.3

Solution

Unfortunately, there is no solution available yet.

Weakness

  • CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')

Source file

npm/ts-fns/CVE-2025-57351.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Mon, 29 Sep 2025 00:18:53 +0000.