CVE-2023-41336: Symfony/ux autocomplete Prevent Injection Of Invalid Entity Vulnerability
MODERATECVE-2023-41336 is a MODERATE (CVSS 6.5) prevent injection of invalid entity vulnerability (CWE-20: Improper Input Validation) affecting Symfony/ux autocomplete libraries in the Packagist ecosystem. The issue involves prevent injection of invalid entity ids for "autocomplete" fields. Remediation is available by upgrading affected packages to version 2.11.2.
CVE-2023-41336 at a Glance
Security Impact
CVSS: 6.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).
How to Fix CVE-2023-41336
To remediate this vulnerability, upgrade all affected Symfony/ux autocomplete dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade symfony/ux-autocomplete to 2.11.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/ux-autocomplete
How to Check if You Are Affected
To determine whether your application is affected by CVE-2023-41336, inspect your project dependencies for Symfony/ux autocomplete:
inspect dependencies for symfony/ux-autocomplete
Analyze the terminal output to locate any version of Symfony/ux autocomplete in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.11.2), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Symfony/ux autocomplete, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-41336 Affected Symfony/ux autocomplete Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/ux-autocomplete
|
Packagist |
< 2.11.2
|
2.11.2
|
References
Frequently Asked Questions
What is CVE-2023-41336?
Which Symfony/ux autocomplete versions are affected?
What version fixes CVE-2023-41336?
Is symfony/ux-autocomplete affected?
What is the CVSS score of CVE-2023-41336?
What CWE is associated with CVE-2023-41336?
How can I check Packagist dependencies for CVE-2023-41336?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4cpv-669c-r79x",
"modified" : "2023-09-11T14:43:05Z",
"published" : "2023-09-11T14:43:05Z",
"aliases" : [ "CVE-2023-41336" ],
"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' => 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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/ux-autocomplete"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.11.2"
} ]
} ]
} ],
"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"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-20" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-09-11T14:43:05Z",
"nvd_published_at" : "2023-09-11T20:15:10Z"
}
}