PHPackages                             symfony/security-csrf - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. symfony/security-csrf

ActiveLibrary[Security](/categories/security)

symfony/security-csrf
=====================

Symfony Security Component - CSRF Library

v8.1.0(1w ago)1.8k183.8M↓30.7%820MITPHPPHP &gt;=8.4.1

Since Oct 7Pushed 1w ago7 watchersCompare

[ Source](https://github.com/symfony/security-csrf)[ Packagist](https://packagist.org/packages/symfony/security-csrf)[ Docs](https://symfony.com)[ Fund](https://symfony.com/sponsor)[ GitHub Sponsors](https://github.com/fabpot)[ RSS](/packages/symfony-security-csrf/feed)WikiDiscussions 8.2 Synced 1w ago

READMEChangelog (10)Dependencies (17)Versions (533)Used By (20)Security (2)

Security Component - CSRF
=========================

[](#security-component---csrf)

The Security CSRF (cross-site request forgery) component provides a class `CsrfTokenManager` for generating and validating CSRF tokens.

Sponsor
-------

[](#sponsor)

The Security component for Symfony 8.1 is [backed](https://symfony.com/backers) by [SymfonyCasts](https://symfonycasts.com).

Learn Symfony faster by watching real projects being built and actively coding along with them. SymfonyCasts bridges that learning gap, bringing you video tutorials and coding challenges. Code on!

Help Symfony by [sponsoring](https://symfony.com/sponsor) its development!

Resources
---------

[](#resources)

- [Documentation](https://symfony.com/doc/current/components/security.html)
- [Contributing](https://symfony.com/doc/current/contributing/index.html)
- [Report issues](https://github.com/symfony/symfony/issues) and [send Pull Requests](https://github.com/symfony/symfony/pulls)in the [main Symfony repository](https://github.com/symfony/symfony)

###  Health Score

85

—

ExcellentBetter than 100% of packages

Maintenance98

Actively maintained with recent releases

Popularity76

Solid adoption and visibility

Community48

Growing community involvement

Maturity100

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 53.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~9 days

Total

533

Last Release

11d ago

Major Versions

v7.4.4 → v8.0.42026-01-23

v7.4.6 → v8.0.62026-02-13

v7.4.8 → v8.0.82026-03-30

6.4.x-dev → 7.4.x-dev2026-04-18

7.4.x-dev → 8.0.x-dev2026-04-18

PHP version history (14 changes)v2.4.0-BETA1PHP &gt;=5.3.3

v2.7.0-BETA1PHP &gt;=5.3.9

v3.0.0-BETA1PHP &gt;=5.5.9

v3.3.7PHP ^5.5.9|&gt;=7.0.8

v4.0.0-BETA1PHP ^7.1.3

v5.0.0-BETA1PHP ^7.2.9

v5.0.2PHP ^7.2.5

v4.4.13PHP &gt;=7.1.3

5.0.x-devPHP &gt;=7.2.5

v6.0.0-BETA1PHP &gt;=8.0.2

v6.1.0-BETA1PHP &gt;=8.1

v7.0.0PHP &gt;=8.2

v8.0.0-BETA1PHP &gt;=8.4

v8.1.0-BETA1PHP &gt;=8.4.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/47313?v=4)[Fabien Potencier](/maintainers/fabpot)[@fabpot](https://github.com/fabpot)

---

Top Contributors

[![nicolas-grekas](https://avatars.githubusercontent.com/u/243674?v=4)](https://github.com/nicolas-grekas "nicolas-grekas (268 commits)")[![fabpot](https://avatars.githubusercontent.com/u/47313?v=4)](https://github.com/fabpot "fabpot (132 commits)")[![xabbuh](https://avatars.githubusercontent.com/u/1957048?v=4)](https://github.com/xabbuh "xabbuh (24 commits)")[![derrabus](https://avatars.githubusercontent.com/u/1506493?v=4)](https://github.com/derrabus "derrabus (16 commits)")[![jderusse](https://avatars.githubusercontent.com/u/578547?v=4)](https://github.com/jderusse "jderusse (6 commits)")[![Tobion](https://avatars.githubusercontent.com/u/610090?v=4)](https://github.com/Tobion "Tobion (5 commits)")[![webmozart](https://avatars.githubusercontent.com/u/176399?v=4)](https://github.com/webmozart "webmozart (5 commits)")[![fancyweb](https://avatars.githubusercontent.com/u/3658119?v=4)](https://github.com/fancyweb "fancyweb (4 commits)")[![OskarStark](https://avatars.githubusercontent.com/u/995707?v=4)](https://github.com/OskarStark "OskarStark (4 commits)")[![alexandre-daubois](https://avatars.githubusercontent.com/u/2144837?v=4)](https://github.com/alexandre-daubois "alexandre-daubois (3 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (3 commits)")[![pierredup](https://avatars.githubusercontent.com/u/144858?v=4)](https://github.com/pierredup "pierredup (2 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (2 commits)")[![GromNaN](https://avatars.githubusercontent.com/u/400034?v=4)](https://github.com/GromNaN "GromNaN (2 commits)")[![keradus](https://avatars.githubusercontent.com/u/2716794?v=4)](https://github.com/keradus "keradus (2 commits)")[![GrahamCampbell](https://avatars.githubusercontent.com/u/2829600?v=4)](https://github.com/GrahamCampbell "GrahamCampbell (2 commits)")[![wouterj](https://avatars.githubusercontent.com/u/749025?v=4)](https://github.com/wouterj "wouterj (2 commits)")[![jprivet-dev](https://avatars.githubusercontent.com/u/3596214?v=4)](https://github.com/jprivet-dev "jprivet-dev (2 commits)")[![rosier](https://avatars.githubusercontent.com/u/117380?v=4)](https://github.com/rosier "rosier (1 commits)")[![saro0h](https://avatars.githubusercontent.com/u/667519?v=4)](https://github.com/saro0h "saro0h (1 commits)")

---

Tags

componentphpsymfonysymfony-component

### Embed Badge

![Health badge](/badges/symfony-security-csrf/health.svg)

```
[![Health](https://phpackages.com/badges/symfony-security-csrf/health.svg)](https://phpackages.com/packages/symfony-security-csrf)
```

###  Alternatives

[symfony/routing

Maps an HTTP request to a set of configuration variables

7.7k819.6M2.3k](/packages/symfony-routing)[twig/twig

Twig, the flexible, fast, and secure template language for PHP

8.4k457.8M6.8k](/packages/twig-twig)[symfony/dependency-injection

Allows you to standardize and centralize the way objects are constructed in your application

4.2k447.1M8.9k](/packages/symfony-dependency-injection)[symfony/security-http

Symfony Security Component - HTTP Integration

1.7k172.8M343](/packages/symfony-security-http)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k246.0M11.0k](/packages/symfony-framework-bundle)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.8M710](/packages/sylius-sylius)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
