Lucene search

K
osvGoogleOSV:GHSA-W387-5QQW-7G8M
HistoryMar 29, 2024 - 7:03 p.m.

Content-Security-Policy header generation in middleware could be compromised by malicious injections

2024-03-2919:03:59
Google
osv.dev
9
middleware
injection
csp headers
ssr
automated generation
web application
external users
allow-listing
malicious scripts
patches
version 1.3.0
workarounds

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

7.1 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

9.1%

Impact

When the following conditions are met:

  • Automated CSP headers generation for SSR content is enabled
  • The web application serves content that can be partially controlled by external users

Then it is possible that the CSP headers generation feature might be “allow-listing” malicious injected resources like inlined JS, or references to external malicious scripts.

Patches

Available in version 1.3.0 .

Workarounds

  • Do not enable CSP headers generation.
  • Use it only for dynamically generated content that cannot be controlled by external users in any way.

References

Are there any links users can visit to find out more?

CPENameOperatorVersion
@kindspells/astro-shieldeq1.2.0

7.5 High

CVSS3

Attack Vector

NETWORK

Attack Complexity

LOW

Privileges Required

NONE

User Interaction

NONE

Scope

UNCHANGED

Confidentiality Impact

NONE

Integrity Impact

HIGH

Availability Impact

NONE

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N

7.1 High

AI Score

Confidence

High

0.0004 Low

EPSS

Percentile

9.1%