Packages

Input Sanitization & Security Packages

Input sanitization, XSS prevention, and application-security utilities that clean untrusted input before it reaches your rendering or storage layer (DOMPurify).

55 packages

Packages in Input Sanitization & Security

Showing 55 packages
90Health
Librarynpm

DOMPurify

DOM-only, uber-tolerant XSS sanitizer for HTML, MathML, and SVG that runs in the browser and on the server.

17,312
Apache 2.0
Used by 130
52Health
Librarynpm

cors

Node.js CORS middleware for Express and Connect that sets standards-compliant headers to control cross-origin browser access.

6,189
MIT
Used by 77
85Health
Librarynpm

sanitize-html

Allowlist-based HTML sanitizer that strips XSS vectors from untrusted markup while preserving the tags and attributes you choose to keep.

4,599
MIT
Used by 42
37Health
Librarynpm

rehype-sanitize

A unified rehype plugin that sanitizes HTML to prevent XSS by dropping anything a schema does not explicitly allow.

219
MIT
Used by 32
74Health
Librarynpm

helmet

Secure Node and Express apps by setting protective HTTP response headers with a single line of middleware.

10,718
MIT
Used by 31
84Health
Librarynpm

express-rate-limit

Basic IP rate-limiting middleware for Express to throttle repeated requests and protect public APIs and sensitive endpoints.

3,285
MIT
Used by 30
77Health
Librarynpm

validator.js

A dependency-free library of 100+ string validators and sanitizers for Node.js and the browser.

23,738
MIT
Used by 26
60Health
Librarynpm

isbot

Detect bots, crawlers, and spiders from the user agent string with a single call.

1,159
Other
Used by 22
65Health
Librarynpm

rate-limiter-flexible

Atomic and non-atomic counters and rate-limiting tools that protect against DoS and brute-force attacks at any scale

3,582
Other
Used by 16
41Health
LibraryPyPI

defusedxml

Drop-in replacements for Python's XML modules that block XML-bomb and entity-expansion attacks

551
Other
Used by 14
75Health
Librarynpm

isolated-vm

Secure, isolated V8 JavaScript environments for Node.js

2,888
Other
Used by 13
75Health
Librarynpm

@fastify/cors

Official Fastify plugin that adds configurable CORS headers and preflight handling to any Fastify API.

494
MIT
Used by 13
70Health
LibraryPyPI

django-cors-headers

Configurable CORS headers middleware for Django applications

5,585
MIT
Used by 10
54Health
LibraryPyPI

Bleach

Allowlist-based HTML sanitizing library for untrusted text

2,769
Apache 2.0
Used by 9
43Health
LibraryComposer

enshrined/svg-sanitize

A PHP SVG/XML sanitizer that strips malicious markup from untrusted SVGs

545
Other
Used by 7

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search