Vulnerabilities in pkg:npm/@nestjs/common
PACKAGECVE-2024-29409 is a MODERATE (CVSS 5.5) nest allows a remote attacker vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting @nestjs/common libraries in the npm ecosystem. The issue involves nest allows a remote attacker to execute arbitrary code via the content-type header. Remediation is available by upgrading affected packages to version 11.0.16, 10.4.16.
pkg:npm/@nestjs/common
Vulnerability advisories affecting package pkg:npm/@nestjs/common. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-cj7v-w2c7-cp7c | CVE-2024-29409 | MODERATE | nest allows a remote attacker to execute arbitrary code via the Content-Type header |
CVE-2024-29409 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L).
How to Fix CVE-2024-29409
To remediate this vulnerability, upgrade all affected @nestjs/common 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 @nestjs/common@11.0.16
npm install @nestjs/common@10.4.16
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @nestjs/common
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-29409, inspect your project dependencies using npm:
npm ls @nestjs/common
Analyze the terminal output to locate any version of @nestjs/common in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.0.16), your application is affected.
Note: The npm ls @nestjs/common 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-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In @nestjs/common, 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-2024-29409 Affected @nestjs/common Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@nestjs/common
|
npm |
≥ 11.0.0-next.1
< 11.0.16
|
11.0.16
|
|
@nestjs/common
|
npm |
< 10.4.16
|
10.4.16
|
References
Frequently Asked Questions
What is CVE-2024-29409?
Which @nestjs/common versions are affected?
What version fixes CVE-2024-29409?
Is @nestjs/common affected?
What is the CVSS score of CVE-2024-29409?
What CWE is associated with CVE-2024-29409?
How can I check npm dependencies for CVE-2024-29409?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-cj7v-w2c7-cp7c",
"modified" : "2025-04-14T22:25:17Z",
"published" : "2025-03-14T18:30:51Z",
"aliases" : [ "CVE-2024-29409" ],
"summary" : "nest allows a remote attacker to execute arbitrary code via the Content-Type header",
"details" : "File Upload vulnerability in nestjs nest prior to v.11.0.16 allows a remote attacker to execute arbitrary code via the Content-Type header.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@nestjs/common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.0-next.1"
}, {
"fixed" : "11.0.16"
} ]
} ]
}, {
"package" : {
"ecosystem" : "npm",
"name" : "@nestjs/common"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "10.4.16"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-29409"
}, {
"type" : "WEB",
"url" : "https://github.com/nestjs/nest/issues/13311#issuecomment-1993839495"
}, {
"type" : "WEB",
"url" : "https://github.com/nestjs/nest/issues/14876"
}, {
"type" : "WEB",
"url" : "https://github.com/nestjs/nest/issues/14876#issuecomment-2796888038"
}, {
"type" : "WEB",
"url" : "https://github.com/nestjs/nest/pull/14881"
}, {
"type" : "WEB",
"url" : "https://gist.github.com/aydinnyunus/801342361584d1491c67a820a714f53f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/nestjs/nest"
}, {
"type" : "WEB",
"url" : "https://github.com/nestjs/nest/blob/83a48b2c7396985144b7a6cd5d3bee1abb7c5d81/packages/common/pipes/file/file-type.validator.ts#L19"
}, {
"type" : "WEB",
"url" : "https://github.com/nestjs/nest/releases/tag/v10.4.16"
}, {
"type" : "WEB",
"url" : "https://github.com/nestjs/nest/releases/tag/v11.0.16"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-94" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-03-27T21:13:49Z",
"nvd_published_at" : "2025-03-14T18:15:27Z"
}
}