Vulnerabilities in pkg:npm/ts-fns
PACKAGECVE-2025-57351 is a MODERATE ts-fns has prototype pollution vulnerability vulnerability (CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution')) affecting Ts fns libraries in the npm ecosystem. The issue involves ts-fns has prototype pollution vulnerability. Remediation is available in the latest vendor maintenance releases.
pkg:npm/ts-fns
Vulnerability advisories affecting package pkg:npm/ts-fns. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-g7wq-wggw-vmhg | CVE-2025-57351 | MODERATE | ts-fns has prototype pollution vulnerability |
CVE-2025-57351 at a Glance
How to Fix CVE-2025-57351
To remediate this vulnerability, upgrade all affected Ts fns dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install ts-fns@Latest secure release
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls ts-fns
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2025-57351, inspect your project dependencies using npm:
npm ls ts-fns
Analyze the terminal output to locate any version of Ts fns in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than the patched release), your application is affected.
Note: The npm ls ts-fns command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution'), where the product receives input from an upstream component that specifies attributes that are to be initialized or updated in an object, but it does not properly control modifications of attributes of the object prototype. In Ts fns, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2025-57351 Affected Ts fns Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
ts-fns
|
npm |
≤ 13.1.3
|
|
References
Frequently Asked Questions
What is CVE-2025-57351?
Which Ts fns versions are affected?
What version fixes CVE-2025-57351?
Is ts-fns affected?
What CWE is associated with CVE-2025-57351?
How can I check npm dependencies for CVE-2025-57351?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g7wq-wggw-vmhg",
"modified" : "2025-09-25T17:32:34Z",
"published" : "2025-09-24T21:30:37Z",
"aliases" : [ "CVE-2025-57351" ],
"summary" : "ts-fns has prototype pollution vulnerability",
"details" : "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.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "ts-fns"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"last_affected" : "13.1.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-57351"
}, {
"type" : "WEB",
"url" : "https://github.com/tangshuang/ts-fns/issues/36"
}, {
"type" : "WEB",
"url" : "https://github.com/VulnSageAgent/PoCs/tree/main/JavaScript/prototype-pollution/CVE-2025-57351"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/tangshuang/ts-fns"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-1321" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-09-25T17:32:34Z",
"nvd_published_at" : "2025-09-24T19:15:40Z"
}
}