{"id":"CVE-2024-50343","aliases":["CVE-2024-50343","GHSA-g3rh-rrhp-jhh9"],"related":[],"kind":"vulnerability","state":"published","title":"Incorrect response from Validator when input ends with `\\n` in symfony/validator","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Description\n\nIt is possible to trick a `Validator` configured with a regular expression using the `$` metacharacters, with an input ending with `\\n`.\n\n### Resolution\n\nSymfony now uses the `D` regex modifier to match the entire input.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/7d1032bbead9a4229b32fa6ebca32681c80cb76f) for branch 5.4.\n\n### Credits\n\nWe would like to thank Offscript for reporting the issue and Alexandre Daubois for providing the fix.","format":"markdown","source":"ghsa"},{"lang":"es","text":"symfony/validator es un módulo para el framework PHP Symphony que proporciona herramientas para validar valores. Es posible engañar a un `Validator` configurado con una expresión regular utilizando los metacaracteres `$`, con una entrada que termina en `\\n`. Symfony a partir de las versiones 5.4.43, 6.4.11 y 7.1.4 ahora utiliza el modificador de expresión regular `D` para que coincida con toda la entrada. Se recomienda a los usuarios que actualicen. No se conocen workarounds para esta vulnerabilidad.","source":"nvd"}],"published":"2024-11-06T15:21:08.000Z","modified":"2026-06-17T08:04:16.380Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N","score":3.1,"rating":"LOW"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N","score":3.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:L/I:N/A:N","score":3.1,"rating":"LOW"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N","rating":"LOW"}],"cwes":["CWE-20"],"affected":[{"ranges":[{"version":"< 5.4.43","status":"affected"},{"version":">= 6.0.0, < 6.4.11","status":"affected"},{"version":">= 7.0.0, < 7.1.4","status":"affected"}],"vendor":"symfony","product":"symfony","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.43"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.11"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.1.4"}],"ecosystem":"Packagist","package":"symfony/symfony","purl":"pkg:composer/symfony/symfony","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"5.4.43"}],"ecosystem":"Packagist","package":"symfony/validator","purl":"pkg:composer/symfony/validator","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"6.0.0","status":"affected","fixed":"6.4.11"}],"ecosystem":"Packagist","package":"symfony/validator","purl":"pkg:composer/symfony/validator","source":"ghsa"},{"ranges":[{"type":"ecosystem","introduced":"7.0.0","status":"affected","fixed":"7.1.4"}],"ecosystem":"Packagist","package":"symfony/validator","purl":"pkg:composer/symfony/validator","source":"ghsa"}],"references":[{"url":"https://github.com/symfony/symfony/security/advisories/GHSA-g3rh-rrhp-jhh9","tags":["web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/symfony/symfony/commit/7d1032bbead9a4229b32fa6ebca32681c80cb76f","tags":["web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2025/05/msg00051.html","tags":["web"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2024-50343","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2024-50343.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/validator/CVE-2024-50343.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/symfony/symfony","tags":["package"],"sources":["ghsa"]},{"url":"https://symfony.com/cve-2024-50343","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-11-07T15:25:47.383Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2024-50343","url":"https://www.cve.org/CVERecord?id=CVE-2024-50343","licence":"CVE Terms of Use","modified":"2025-11-03T19:31:45.637Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-g3rh-rrhp-jhh9","url":"https://github.com/advisories/GHSA-g3rh-rrhp-jhh9","licence":"CC-BY-4.0","modified":"2025-11-03T23:16:31.077Z"},{"source":"nvd","name":"NVD","id":"CVE-2024-50343","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-50343","licence":"Public domain","modified":"2026-06-17T08:04:16.380Z"}],"updatedAt":"2026-11-25T22:58:47.846Z","epss":{"score":0.00455,"percentile":0.41232,"date":"2026-12-01T12:00:22.000Z"}}