SSRF in hatchful.shopify.com
The logo generation feature accepted raw SVG data from the client over WebSockets and used it server-side to create PNG images, allowing an attacker to inject external references. This could let an attacker read local files, perform denial-of-service, or probe internal networks.
- Triaged in 12 hours
- Fixed in 4 months
- Paid in 5 days
- Disclosed after 7 months
Summary by the program
@zhurig reported an SSRF issue in our logo generation on hatchful.shopify.com. This occurred because raw SVG data was being passed from the client via WebSockets, and then used when generating the logos. We have refactored this process to send only generic parameters about the customizations made by the user, rather than sending the SVG itself.
The report
This vulnerability similar to https://hackerone.com/reports/156877 , that I found in your old version of your logo-creator. During logo-creating process the user can select logo in wysiwyg editor, then enter email address and wait. In this moment server send to user's browser large amount of data through websockets. Among these data there are svg files (with escaped characters ",quotation mark ) . Then, this svg-files browser send to server to convert in png, and png-files send to user through link in email.
User can change svg-files that browser send to server, and can insert own xlink:href object and :
Link to local image files, to fingerprint versions of libraries installed on server; "Billion laughs" attack, possible DoS attack to converter server; Try to change protocol to ftp and connect to ftp-servers; Try to exploit vulnerabilities like "Imagetragic", or XXE
Impact
Read files from the server Abuse the trust relationship between the vulnerable server and others Retrieve sensitive information from server
Try to : Scan the internal network to which the server is connected to Use other image-converter vulnerabilities
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Impact
An attacker could read files from the server, abuse trust relationships, retrieve sensitive information, scan the internal network, or exploit image-converter vulnerabilities; the report notes these are attempts and does not confirm successful exploitation.
What the attacker needed
Access to logo creation feature
The fix
The process was refactored to send only generic parameters about customisations instead of raw SVG data.
How it was found
- Start creating a logo and select a design in the editor.
- Enter an email address and wait for the server to send SVG data over WebSockets.
- Modify the SVG data sent by the browser to the server, adding an xlink:href reference.
- The server processes the modified SVG and returns a PNG via email.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
When you make a logo, your browser sends the logo's drawing instructions (SVG) to the server, which turns it into a picture (PNG). The server trusted whatever drawing instructions it received, so someone could add instructions that make the server fetch other files or addresses. That could let them see files on the server or cause problems.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.