# ModSecurity

> Open source web application firewall engine

Source: https://talira.ai/catalog/modsecurity-8j8b9ahs
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library, Plugin
- Categories: [security / waf](https://talira.ai/categories/security/waf)
- Licence: Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source.
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- API: yes[^3]
- Backed by: [OWASP Foundation](https://talira.ai/orgs/owasp-foundation.md)

ModSecurity is an open source, cross-platform web application firewall (WAF) engine, now run by the OWASP Foundation. It inspects HTTP(S) traffic and applies rules written in its SecRules language, and paired with the OWASP Core Rule Set it blocks common attacks such as SQL injection and cross-site scripting. Version 3 is libmodsecurity, a rewrite with no Apache dependency that plugs into web servers through connectors (such as [nginx](https://talira.ai/catalog/nginx-nfjkekkp.md)); version 2 is the module for [Apache HTTP Server](https://talira.ai/catalog/apache-http-server-cargq8xk.md) and is still maintained. It's used by businesses, governments, ISPs and commercial WAF vendors.

## Links

- Website: https://modsecurity.org/
- GitHub: https://github.com/owasp-modsecurity/ModSecurity

## Problems it solves

- add a web application firewall in front of my nginx server
- block SQL injection and XSS attacks against my web app with open source tools
- run the OWASP Core Rule Set on my own web server
- a free WAF module for Apache
- write custom rules to filter malicious HTTP requests

## Features

- SecRules rules language
- works with the OWASP Core Rule Set
- libmodsecurity (v3) with web server connectors
- Apache module (v2), still maintained
- HTTP(S) traffic visibility and audit logging

## Capabilities

- Has an API: plan not known

## Trust

Overall: 0.32 out of 1.
Signals: backing 0.30, extensibility 0.20.

- backed by OWASP Foundation

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [nginx](https://talira.ai/catalog/nginx-nfjkekkp.md)
- Works with [Apache HTTP Server](https://talira.ai/catalog/apache-http-server-cargq8xk.md)

## Alternatives

- [OWASP Coraza](https://talira.ai/catalog/owasp-coraza-8exykk9b.md): Open source, high performance web application firewall written in Go
- [open-appsec](https://talira.ai/catalog/open-appsec-3xxebgcq.md): Machine learning web application firewall and API security
- [CrowdSec](https://talira.ai/catalog/crowdsec-vd2qswsz.md): Open-source IDS/IPS, WAF and bot detection with a crowdsourced blocklist of malicious IPs
- [SafeLine](https://talira.ai/catalog/safeline-c57rajdy.md): Self-hosted web application firewall and reverse proxy that protects web apps from attacks
- [BunkerWeb](https://talira.ai/catalog/bunkerweb-43vzf2he.md): Open source web application firewall built on NGINX
- [OWASP CRS](https://talira.ai/catalog/owasp-crs-fa0wfa1r.md): Generic attack detection rules for web application firewalls

## Sources

[^1]: https://github.com/owasp-modsecurity/ModSecurity/blob/v3/master/LICENSE (checked 23 Nov 2026)
[^2]: https://modsecurity.org/ (checked 23 Nov 2026)
[^3]: https://github.com/owasp-modsecurity/ModSecurity (checked 23 Nov 2026)
