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(1mo ago)1.8k188.3M↓26.3%820MITPHPPHP &gt;=8.4.1

Since Oct 7Pushed 1mo 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 3w 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

82

—

ExcellentBetter than 100% of packages

Maintenance89

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

Recently: every ~2 days

Total

533

Last Release

50d 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-06-05

7.4.x-dev → 8.0.x-dev2026-06-05

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/security-http

Symfony Security Component - HTTP Integration

1.7k177.2M393](/packages/symfony-security-http)[sylius/sylius

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

8.5k5.9M754](/packages/sylius-sylius)[symfony/dependency-injection

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

4.2k455.6M9.9k](/packages/symfony-dependency-injection)[symfony/framework-bundle

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

3.6k251.7M11.8k](/packages/symfony-framework-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M400](/packages/easycorp-easyadmin-bundle)[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k185.6M2.4k](/packages/symfony-security-bundle)

PHPackages © 2026

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