Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
SVG-Sanitizer — PHP library that sanitizes SVG files using a whitelist of allowed elements and attributes, stripping malicious markup such as scripts and event handlers. | Kitploit
Tools/GitHubGitHub/alnorris/svg-sanitizer
Defensive ToolsVulnerability AnalysisWeb SecurityUtilities & Frameworks
GitHubalnorris/svg-sanitizer

SVG-Sanitizer

PHP library that sanitizes SVG files using a whitelist of allowed elements and attributes, stripping malicious markup such as scripts and event handlers.

View Repository
225813 years agoReviewed by Kitploit

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

SVG Sanitizer

Whitelist-based PHP SVG sanitizer.

Usage

<?php

// load
require_once('SvgSanitizer.php');
$svg = new SvgSanitizer();

// load SVG
$svg->load("evil.svg");

// sanitize!
$svg->sanitize();

// Print out sanitized SVG
echo $svg->saveSVG();

?>

License

MIT

Download Tool