Skip to content
Security module for php7 - Killing bugclasses and virtual-patching the rest!
Branch: master
Clone or download
Latest commit 809920b Feb 23, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
config Improve a bit the default rules Jan 16, 2019
debian Minor improvements of debian/rules Jan 16, 2019

Snuffleupagus' logo

Security module for php7 - Killing bugclasses and virtual-patching the rest!

Travis-ci gitlab pipeline testing _all_ distributions Coverity CII Best Practises coveralls twitter

Key FeaturesDownloadExamplesDocumentationLicenseThanks

Snuffleupagus is a PHP 7+ module designed to drastically raise the cost of attacks against websites, by killing entire bug classes. It also provides a powerful virtual-patching system, allowing administrator to fix specific vulnerabilities and audit suspicious behaviours without having to touch the PHP code.

Key Features

  • Close to zero performance impact
  • Powerful yet simple to write virtual-patching rules
  • Killing several classes of vulnerabilities
  • Several hardening features
    • Automatic secure and samesite flag for cookies
    • Bundled set of rules to detect post-compromissions behaviours
    • Global strict mode and type-juggling prevention
    • Whitelisting of stream wrappers
    • Preventing writeable files execution
    • Whitelist/blacklist for eval
    • Enforcing TLS certificate validation when using curl
    • Request dumping capability
  • A relatively sane codebase:


We've got a download page, where you can find packages for your distribution, but you can of course just git clone this repo, or check the releases on github.


We're providing various example rules, that are looking like this:

# Harden the `chmod` function

# Mitigate command injection in `system`

Upon violation of a rule, you should see lines like this in your logs:

[snuffleupagus][][disabled_function][drop] The execution has been aborted in /var/www/index.php:2, because the return value (0) of the function 'strpos' matched a rule.


We've got a comprehensive website with all the documentation that you could possibly wish for. You can of course build it yourself.


Many thanks to the Suhosin project for being a huge source of inspiration, and to all our contributors.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.