GHSA-4cpv-669c-r79x

Suggest an improvement
Source
https://github.com/advisories/GHSA-4cpv-669c-r79x
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/09/GHSA-4cpv-669c-r79x/GHSA-4cpv-669c-r79x.json
JSON Data
https://api.test.osv.dev/v1/vulns/GHSA-4cpv-669c-r79x
Aliases
Published
2023-09-11T14:43:05Z
Modified
2023-11-10T05:29:03.741149Z
Severity
  • 6.5 (Medium) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N CVSS Calculator
Summary
Prevent injection of invalid entity ids for "autocomplete" fields
Details

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.

Database specific
{
    "nvd_published_at": "2023-09-11T20:15:10Z",
    "cwe_ids": [
        "CWE-20"
    ],
    "severity": "MODERATE",
    "github_reviewed": true,
    "github_reviewed_at": "2023-09-11T14:43:05Z"
}
References

Affected packages

Packagist / symfony/ux-autocomplete

Package

Name
symfony/ux-autocomplete
Purl
pkg:composer/symfony/ux-autocomplete

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.11.2

Affected versions

v2.*

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
v2.10.0
v2.11.0
v2.11.1