Skip to content

@netlify/ipx vulnerable to Full Response SSRF and Stored XSS via Cache Poisoning and Improper Host Validation

Moderate severity GitHub Reviewed Published Sep 21, 2022 in netlify/netlify-ipx • Updated Jan 12, 2023

Package

npm @netlify/ipx (npm)

Affected versions

< 1.2.3

Patched versions

1.2.3

Description

Impact

By sending specially crafted headers an attacker can bypass the source image domain allowlist, causing the handler to load and return arbitrary images. Because the response is cached globally, this image will then be served to visitors without requiring those headers to be set. XSS can be achieved by requesting a malicious SVG with embedded scripts, which would then be served from the site domain. Note that this does not apply to images loaded in <img> tags, as scripts do not execute in this context. The image URL can be set in the header independently of the request URL, meaning any site images that have not previously been cached can have their cache poisoned.

Patches

This problem has been fixed in version 1.2.3

Workarounds

The problem is no longer exploitable on Netlify as the CDN now sanitizes the relevant header. Cached content can be cleared by re-deploying the site.

References

Last updated Jan 12, 2023
Reviewed Sep 21, 2022
Published to the GitHub Advisory Database Sep 21, 2022
@dustincrogers dustincrogers published to netlify/netlify-ipx Sep 21, 2022

Severity

Moderate
6.1
/ 10

CVSS base metrics

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N

Weaknesses

CVE ID

CVE-2022-39239

GHSA ID

GHSA-9jjv-524m-jm98

Source code

Checking history
See something to contribute? Suggest improvements for this vulnerability.