CVE-2026-105708 in imgproxy
Summary
by MITRE • 10/06/2026
A flaw has been found in imgproxy up to 4.0.17. Affected by this vulnerability is the function sanitizeElement of the file processing/svg/svg.go of the component SVG Handler. Executing a manipulation can lead to cross site scripting. It is possible to launch the attack remotely. The exploit has been published and may be used. The project was informed of the problem early through an issue report but has not responded yet.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 10/06/2026
The vulnerability identified in imgproxy versions up to 4.0.17 represents a significant security risk within its SVG processing pipeline, specifically located in the sanitizeElement function found in the svg.go file under the SVG Handler component. This flaw stems from insufficient input validation and sanitization mechanisms when handling Scalable Vector Graphics files. As an image proxy service designed to resize, convert, and optimize images on the fly, imgproxy must parse various formats including SVGs which are XML-based documents capable of embedding scripts. The specific defect allows malicious actors to inject crafted SVG content that bypasses existing security filters, leading directly to Cross-Site Scripting (XSS) attacks when these processed images are served to end-users in web browsers.
From a technical perspective, the root cause lies in how the sanitizeElement function processes elements within the SVG structure. While imgproxy attempts to strip dangerous attributes or tags that could execute JavaScript code upon rendering, the implementation fails to account for all possible vectors of script injection. Attackers can exploit this by embedding event handlers such as onload or onerror directly into image tags, or by utilizing CSS expressions and other XML-based execution contexts that are not adequately neutralized by the current sanitization logic. Because SVGs are rendered natively by web browsers rather than being treated as static binary images like JPEGs or PNGs, any embedded script is executed in the context of the viewing page, granting the attacker access to sensitive cookies, session tokens, and local storage data associated with that domain.
The operational impact of this vulnerability is severe due to its remote exploitability. Since imgproxy is often deployed as a middleware service between web servers and client browsers, an attacker who can influence the source image URL or upload malicious SVGs through any integrated interface can trigger the XSS payload. The fact that public exploits have been published significantly lowers the barrier for entry, allowing less sophisticated attackers to leverage existing proof-of-concept code against vulnerable instances. This transforms a theoretical flaw into an immediate and widespread threat landscape where automated scanning tools can rapidly identify and compromise unprotected imgproxy deployments across the internet.
In terms of industry standard classification, this vulnerability aligns with CWE-79 Improper Neutralization of Input During Web Page Generation commonly known as Cross-site Scripting. It also maps to MITRE ATT&CK techniques related to Client-side Injection, specifically T1059 which covers command and script interpretation through browser-based execution contexts. The failure occurs during the input validation phase, highlighting a gap in the defense-in-depth strategy where trusted data from potentially untrusted sources is processed without rigorous sanitization before being passed to downstream rendering engines.
Mitigation strategies must be implemented immediately given the availability of public exploits. Organizations relying on imgproxy should upgrade to version 4.0.18 or later, which addresses this specific flaw in the SVG handler's sanitization logic. If upgrading is not immediately feasible, administrators can implement a Web Application Firewall rule set that inspects outgoing responses for suspicious script tags within image content types and blocks them before they reach the client browser. Additionally, enforcing strict Content Security Policy headers with nonces or hashes can mitigate the impact of any successful XSS attempts by preventing unauthorized script execution even if the payload is delivered. Regular audits of third-party dependencies and their configuration settings are essential to maintain a secure posture against evolving vector attacks targeting image processing services.