alkhwlani/xss-middleware
Laravel middleware that sanitizes incoming request data to help prevent XSS attacks. It filters user input and removes malicious HTML/scripts, adding a simple protection layer to your app without changing your existing validation flow.
|
Package
|
Score
|
Description
|
Stars
|
Likes
|
Forks
|
Downloads
|
Issues
|
Score
|
Opportunity
|
License
|
Last Release
|
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| aimeos/sanitizer | 0.86 | Laravel package providing data sanitization helpers: clean and normalize input, strip unwanted characters/tags, and validate common formats. Useful for securing request data and preparing values for storage, APIs, and user-facing output. | 218 | 184 | 0 | 3K | 0 | 1.1 | 15.9 | LGPL-2.1 | — | |
| mitnick/laravel-security | 0.85 | A Laravel security package that provides middleware and configuration to harden your application with security headers, CSP, HSTS, and other common protections. It helps enforce safer defaults across routes and responses with lightweight integration for Laravel projects. | 0 | 81 | — | 26 | — | 0.0 | 20.2 | — | — | |
| graham-campbell/security | 0.84 | A Laravel package from Graham Campbell that helps harden your app by adding configurable security headers to HTTP responses. It provides a simple middleware-based setup for common browser protections, making it easy to improve response security with minimal configuration. | 0 | 255 | — | 8K | — | 0.3 | 54.2 | — | — | |
| masterro/laravel-xss-filter | 0.84 | A Laravel package for filtering XSS from user input. It offers configurable sanitization and middleware to clean request data, helping protect your application from cross-site scripting attacks with minimal setup. | 41 | 41 | 6 | 7K | 0 | 19.8 | 35.6 | MIT | 2 weeks ago | |
| graham-campbell/binput | 0.84 | Binput is a Laravel input cleaner that sanitises user input via HTMLPurifier, stripping dangerous markup while keeping safe content. It handles strings and arrays, supports cleaning types such as default, html, url and query, and integrates through a simple facade for safer request data. | 0 | 181 | — | 3K | — | 0.3 | 47.9 | — | — | |
| rhukster/dom-sanitizer | 0.83 | A fast, MIT-licensed DOM, SVG, and MathML sanitizer for PHP 7.3+. It uses PHP DOMDocument to strip dangerous tags and attributes, borrowing DOMPurify’s extensive allowlists. Configurable options and tag/attribute controls included. | 14 | 11 | 3 | 169K | 0 | 24.5 | 64.8 | MIT | 1 week ago | |
| fitztrev/laravel-html-minify | 0.83 | Laravel HTML Minify is middleware that automatically compresses HTML responses by removing extra whitespace, comments, and optional attributes, reducing page size and improving load times with simple installation and configuration. | 411 | 423 | 43 | 36 | 10 | 6.4 | 4.3 | MIT | — | |
| larahook/purifier | 0.83 | Laravel wrapper for HTMLPurifier that cleans and sanitizes untrusted HTML before it reaches your views. Filter user-generated content through a simple, configurable API to strip XSS and other malicious markup while preserving safe formatting. | 2 | 2 | 0 | 735 | 0 | 8.1 | 35.3 | MIT | 7 months ago | |
| protonemedia/laravel-xss-protection | 0.83 | Laravel XSS Protection provides middleware and validation rules that sanitize user input to guard against cross-site scripting. It recursively cleans request data, supports custom filters, and integrates smoothly with Laravel forms and Blade templates. | 150 | 150 | 9 | 44K | 3 | 10.5 | 38.2 | MIT | 7 months ago | |
| laravel-at/laravel-image-sanitize | 0.83 | Laravel middleware that re-encodes uploaded images to strip hidden malicious payloads, reducing the risk of code execution. Requires PHP 8.3+, Laravel 12/13, and Intervention Image 4. | 345 | 346 | 24 | 5K | 0 | 23.3 | 19.3 | MIT | 2 months ago | |
| typo3/html-sanitizer | 0.83 | A standalone PHP HTML sanitization component from TYPO3, usable in any PHP project. Declarative Behavior settings define allowed tags, attributes, and values; visitors modify or remove nodes; builders combine presets into ready-to-use Sanitizer instances for safe HTML output. | 29 | 29 | 13 | 382K | 6 | 24.6 | 63.1 | MIT | 4 months ago | |
| graham-campbell/security-core | 0.83 | Core security utilities for Laravel, providing a lightweight foundation for sanitizing user input, escaping output, and defending against XSS. Powers the graham-campbell/security package and can be used standalone in any PHP or Laravel application. | 0 | 31 | — | 16K | — | 0.3 | 55.3 | — | — | |
| elegantweb/sanitizer | 0.83 | Laravel package that cleans and normalizes user input before validation. Define sanitizer classes with rule sets to trim strings, cast types, strip tags, and transform request data, keeping controllers lean and application data consistent. Extensible with custom filters. | 115 | — | 15 | — | 0 | 10.1 | — | MIT | 7 months ago | |
| luketowers/purifier | 0.83 | A Laravel wrapper around HTMLPurifier that brings clean, secure HTML sanitization to your application. It offers a Purifier facade, Blade directive, service provider, and publishable config so you can safely filter user-supplied HTML and prevent XSS with minimal setup. | 32 | — | 8 | — | 2 | 0.8 | — | MIT | — | |
| laminas/laminas-escaper | 0.83 | Securely escape untrusted data for HTML, HTML attributes, JavaScript, CSS, and URLs to prevent XSS. Laminas Escaper provides robust, context-aware escaping utilities for PHP apps and templates. | 225 | 222 | 23 | 2M | 6 | 7.5 | 55.9 | BSD-3-Clause | 1 year ago | |
| webpatser/laravel-sanitize | 0.83 | — | 7 | 8 | 1 | 165 | 0 | 0.0 | 13.0 | — | — | |
| phlib/xss-sanitizer | 0.83 | PHP library for sanitizing untrusted HTML and preventing XSS. It parses user-supplied markup, strips dangerous tags, attributes and URLs, and returns safe HTML for rendering in web applications. Configurable rules suit comments, rich text and other user-generated content. | 16 | — | 3 | — | 1 | 0.3 | — | LGPL-3.0 | 2 years ago |
|
| symfony/html-sanitizer | 0.82 | Symfony's HtmlSanitizer component offers an object-oriented API to clean untrusted HTML for safe DOM insertion. Configure allowed elements, attributes, link schemes, and URL forcing to strip scripts and dangerous markup. | 284 | 283 | 13 | 4M | 0 | 36.3 | 64.9 | MIT | 1 week ago | |
| dms/dms-filter | 0.82 | Filter and sanitize object properties via PHP attributes. Annotate fields with rules like Trim, StripTags, and StripNewlines, then run a Filter service to clean entity values automatically—ideal alongside Symfony Validator and for consistent input normalization. | 95 | 96 | 18 | 4K | 2 | 3.9 | 23.7 | MIT | 2 years ago | |
| googlechromelabs/ise-web-security-bundle | 0.82 | A Symfony bundle from Google Chrome Labs that integrates ISE web security tooling into PHP applications. It helps developers configure browser security policies, apply security headers, and harden responses against common web threats with minimal setup and straightforward Symfony integration. | 10 | 10 | 2 | 0 | 4 | 0.6 | 0.5 | Apache-2.0 | 6 years ago |
How can I help you explore Laravel packages today?