CVE-2022-39239: nefly-ipx subject to Server-Side Request Forgery and Stored Cross-Site Scripting via Cache Poisoning and Improper Host Validation
netlify-ipx is an on-Demand image optimization for Netlify using ipx. In versions prior to 1.2.3, an attacker can bypass the source image domain allowlist by sending specially crafted headers, 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. This problem has been fixed in version 1.2.3. As a workaround, cached content can be cleared by re-deploying the site.
Affected Software
Event History
Frequently Asked Questions
What is the severity of CVE-2022-39239?
CVE-2022-39239 has a high severity due to its potential for attackers to bypass security measures.
How do I fix CVE-2022-39239?
To fix CVE-2022-39239, upgrade netlify-ipx to version 1.2.3 or later.
What are the impacts of CVE-2022-39239?
The impacts of CVE-2022-39239 include the ability of attackers to load and return arbitrary images through specially crafted headers.
Which versions of netlify-ipx are affected by CVE-2022-39239?
Versions of netlify-ipx prior to 1.2.3 are affected by CVE-2022-39239.
How does CVE-2022-39239 allow attackers to bypass security?
CVE-2022-39239 allows attackers to bypass security by sending specially crafted headers that exploit the source image domain allowlist.