GitHub Advisoryadvisory · Packagist
GHSA-4cpv-669c-r79x Prevent injection of invalid entity ids for "autocomplete" fields
MEDIUM
Official page ↗
- Aliases
- CVE-2023-41336
- Ecosystem
- Packagist
- Packages
- symfony/ux-autocomplete
- Severity
- Moderate
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
- Weaknesses
- CWE-20
- Reviewed
- 2023-09-11
Affected packages
• Packagist symfony/ux-autocomplete: < 2.11.2 → fixed in 2.11.2
Description
Impact
Under certain circumstances, an attacker could successfully submit an entity id for an `EntityType` that is *not* part of the valid choices.
Affected applications are any that use:
• A custom `query_builder` option to limit the valid results;
AND
• An `EntityType` with `'autocomplete' => true` or a custom AsEntityAutocompleteField.
Under 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`.
Patches
The problem has been fixed in `symfony/ux-autocomplete` version 2.11.2.
Workarounds
Upgrade to version 2.11.2 or greater of `symfony/ux-autocomplete` or perform extra validation after submit to verify the selected option is valid.
Related
Alias · CVE (1)
- CVE-2023-41336 ux-autocomplete is a JavaScript Autocomplete functionality for Symfony. vulnerability
Weakness · CWE (1)
- CWE-20 Improper Input Validation weakness
References
- https://github.com/symfony/ux-autocomplete/security/advisories/GHSA-4cpv-669c-r79x web
- https://nvd.nist.gov/vuln/detail/CVE-2023-41336 advisory
- https://github.com/symfony/ux-autocomplete/commit/fabcb2eee14b9e84a45b276711853a560b5d770c web
- https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/ux-autocomplete/CVE-2023-41336.yaml web
- https://github.com/symfony/ux-autocomplete package
- https://symfony.com/bundles/ux-autocomplete/current/index.html#usage-in-a-form-with-ajax web