{"id":"GHSA-4cpv-669c-r79x","summary":"Prevent injection of invalid entity ids for \"autocomplete\" fields","details":"### Impact\nUnder certain circumstances, an attacker could successfully submit an entity id for an `EntityType` that is *not* part of the valid choices.\n\nAffected applications are any that use:\n\n* A custom `query_builder` option to limit the valid results;\nAND\n* An `EntityType` with `'autocomplete' =\u003e true` or a custom [AsEntityAutocompleteField](https://symfony.com/bundles/ux-autocomplete/current/index.html#usage-in-a-form-with-ajax).\n\nUnder this circumstance, if an id is submitted, it is accepted even if the matching record would not be returned by the custom query built with `query_builder`.\n\n### Patches\n\nThe problem has been fixed in `symfony/ux-autocomplete` version 2.11.2.\n\n### Workarounds\nUpgrade to version 2.11.2 or greater of `symfony/ux-autocomplete` or perform extra validation after submit to verify the selected option is valid.\n","aliases":["CVE-2023-41336"],"modified":"2026-09-10T03:50:03.208668376Z","published":"2023-09-11T14:43:05Z","database_specific":{"github_reviewed":true,"github_reviewed_at":"2023-09-11T14:43:05Z","nvd_published_at":"2023-09-11T20:15:10Z","cwe_ids":["CWE-20"],"severity":"MODERATE"},"references":[{"type":"WEB","url":"https://github.com/symfony/ux-autocomplete/security/advisories/GHSA-4cpv-669c-r79x"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-41336"},{"type":"WEB","url":"https://github.com/symfony/ux-autocomplete/commit/fabcb2eee14b9e84a45b276711853a560b5d770c"},{"type":"WEB","url":"https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-autocomplete/CVE-2023-41336.yaml"},{"type":"PACKAGE","url":"https://github.com/symfony/ux-autocomplete"},{"type":"WEB","url":"https://symfony.com/bundles/ux-autocomplete/current/index.html#usage-in-a-form-with-ajax"}],"affected":[{"package":{"name":"symfony/ux-autocomplete","ecosystem":"Packagist","purl":"pkg:composer/symfony/ux-autocomplete"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.11.2"}]}],"versions":["v2.10.0","v2.11.0","v2.11.1","v2.2.0","v2.3.0","v2.4.0","v2.5.0","v2.6.0","v2.6.1","v2.7.0","v2.7.1","v2.8.0","v2.8.1","v2.9.0","v2.9.1"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/09/GHSA-4cpv-669c-r79x/GHSA-4cpv-669c-r79x.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"}]}