CVE-2024-30250: @kindspells/astro shield Security Vulnerability Vulnerability
HIGHCVE-2024-30250 is a HIGH (CVSS 7.5) security vulnerability vulnerability (CWE-345: Insufficient Verification of Data Authenticity) affecting @kindspells/astro shield libraries in the npm ecosystem. The issue involves in astro-shield, setting a correct `integrity` attribute to injected code allows to bypass the allow-lists. Remediation is available by upgrading affected packages to version 1.3.2.
CVE-2024-30250 at a Glance
Security Impact
CVSS: 7.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2024-30250
To remediate this vulnerability, upgrade all affected @kindspells/astro shield 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 @kindspells/astro-shield@1.3.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls @kindspells/astro-shield
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2024-30250, inspect your project dependencies using npm:
npm ls @kindspells/astro-shield
Analyze the terminal output to locate any version of @kindspells/astro shield in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.2), your application is affected.
Note: The npm ls @kindspells/astro-shield 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-345: Insufficient Verification of Data Authenticity, where the product does not sufficiently verify the origin or authenticity of data, in a way that causes it to accept invalid data. In @kindspells/astro shield, 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-30250 Affected @kindspells/astro shield Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
@kindspells/astro-shield
|
npm |
≥ 1.2.0
< 1.3.2
|
1.3.2
|
References
Frequently Asked Questions
What is CVE-2024-30250?
Which @kindspells/astro shield versions are affected?
What version fixes CVE-2024-30250?
Is @kindspells/astro-shield affected?
What is the CVSS score of CVE-2024-30250?
What CWE is associated with CVE-2024-30250?
How can I check npm dependencies for CVE-2024-30250?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c4gr-q97g-ppwc",
"modified" : "2024-09-12T13:52:45Z",
"published" : "2024-04-01T20:33:53Z",
"aliases" : [ "CVE-2024-30250" ],
"summary" : "In Astro-Shield, setting a correct `integrity` attribute to injected code allows to bypass the allow-lists",
"details" : "### Impact\n\nVersions from 1.2.0 to 1.3.1 of Astro-Shield allow to bypass the allow-lists for cross-origin resources by introducing valid `integrity` attributes to the injected code. This implies that the injected SRI hash would be added to the generated CSP header, which would lead the browser to believe that the injected resource is legit.\n\nTo exploit this vulnerability, the attacker needs to first inject code into the rendered pages by exploiting other not-related potential vulnerabilities.\n\n### Patches\n\nVersion [1.3.2](https://github.com/kindspells/astro-shield/releases/tag/1.3.2) provides a patch.\n\n### Workarounds\n- To not use the middleware functionality of Astro-Shield.\n- To use the middleware functionality of Astro-Shield ONLY for content that cannot be controlled in any way by external users.\n\n### References\n_Are there any links users can visit to find out more?_\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "@kindspells/astro-shield"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.2.0"
}, {
"fixed" : "1.3.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/kindspells/astro-shield/security/advisories/GHSA-c4gr-q97g-ppwc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-30250"
}, {
"type" : "WEB",
"url" : "https://github.com/kindspells/astro-shield/commit/1221019306f501bf5fa9bcfb5a23a2321d34ba0a"
}, {
"type" : "WEB",
"url" : "https://github.com/kindspells/astro-shield/commit/5ae8b8ef4f681d3a81431ee7e79d5dec545c6e1f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/kindspells/astro-shield"
}, {
"type" : "WEB",
"url" : "https://github.com/kindspells/astro-shield/releases/tag/1.3.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-345" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-01T20:33:53Z",
"nvd_published_at" : "2024-04-04T15:15:39Z"
}
}