All Topics
All Topics
Technology
Technology
Design
Design
Programming
Programming
Science
Science
News
News
Gaming
Gaming
Entertainment
Entertainment
Business
Business
Finance
Finance
Sports
Sports
Health
Health
Food
Food
Travel
Travel
Art
Art
Music
Music
Books
Books
Education
Education
Politics
Politics
Personal
Personal
No algorithm. No AI slop. No ads. Just RSS. Pro-human. Indie writers. Real journalism. Open web. Chronological. Hand toasted.

Scratch's ongoing security challenges with SVG sanitization

By

varun_ch

1mo ago· 14 min readenInsight

Summary

The article discusses the security challenges Scratch faces with SVG sanitization. Scratch parses user-generated (attacker-controlled) SVG content into the main document for operations like measuring bounding boxes, which is inherently unsafe. The platform has attempted to mitigate this by building increasingly complex infrastructure to parse SVGs and remove dangerous markup, but this approach has proven fragile, leading to a long history of SVG-related vulnerabilities.

Key quotes

· 4 pulled
Scratch has a long history of SVG-related vulnerabilities.
The source of these is that Scratch parses user-generated (ie. attacker-controlled) content into an <svg> element and appends it into the main document for various operations.
No matter how briefly the SVG remains in the main document, this is an inherently unsafe operation.
Scratch's approach to making this safe has been to build increasingly complex infrastructure around parsing the SVG and the markup within to remove dangerous parts.
Snippet from the RSS feed
Scratch has a long history of SVG-related vulnerabilities. The source of these is that Scratch parses user-generated (ie. attacker-controlled) content into an element and appends it into the main document for various operations (eg. measuring SVG bo

You might also wanna read