VDB
Sign up
LOW3.1

GHSA-g3rh-rrhp-jhh9

Symfony has an incorrect response from Validator when input ends with `\n`

Quick fix

GHSA-g3rh-rrhp-jhh9 — symfony/symfony: upgrade to the fixed version with the command below.

composer require symfony/symfony:^5.4.43

Details

### Description

It is possible to trick a `Validator` configured with a regular expression using the `$` metacharacters, with an input ending with `\n`.

### Resolution

Symfony now uses the `D` regex modifier to match the entire input.

The patch for this issue is available [here](https://github.com/symfony/symfony/commit/7d1032bbead9a4229b32fa6ebca32681c80cb76f) for branch 5.4.

### Credits

We would like to thank Offscript for reporting the issue and Alexandre Daubois for providing the fix.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/symfony/symfony
Introduced in: 0Fixed in: 5.4.43
Fixcomposer require symfony/symfony:^5.4.43
Packagist/symfony/symfony
Introduced in: 6.0.0Fixed in: 6.4.11
Fixcomposer require symfony/symfony:^6.4.11
Packagist/symfony/symfony
Introduced in: 7.0.0Fixed in: 7.1.4
Fixcomposer require symfony/symfony:^7.1.4
Packagist/symfony/validator
Introduced in: 0Fixed in: 5.4.43
Fixcomposer require symfony/validator:^5.4.43
Packagist/symfony/validator
Introduced in: 6.0.0Fixed in: 6.4.11
Fixcomposer require symfony/validator:^6.4.11
Packagist/symfony/validator
Introduced in: 7.0.0Fixed in: 7.1.4
Fixcomposer require symfony/validator:^7.1.4

References