{"api_version":"1","generated_at":"2026-04-23T07:57:01+00:00","cve":"CVE-2022-23614","urls":{"html":"https://cve.report/CVE-2022-23614","api":"https://cve.report/api/cve/CVE-2022-23614.json","docs":"https://cve.report/api","cve_org":"https://www.cve.org/CVERecord?id=CVE-2022-23614","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2022-23614"},"summary":{"title":"CVE-2022-23614","description":"Twig is an open source template language for PHP. When in a sandbox mode, the `arrow` parameter of the `sort` filter must be a closure to avoid attackers being able to run arbitrary PHP functions. In affected versions this constraint was not properly enforced and could lead to code injection of arbitrary PHP code. Patched versions now disallow calling non Closure in the `sort` filter as is the case for some other filters. Users are advised to upgrade.","state":"PUBLIC","assigner":"security-advisories@github.com","published_at":"2022-02-04 23:15:00","updated_at":"2023-11-07 03:44:00"},"problem_types":["CWE-94"],"metrics":[],"references":[{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7/","name":"FEDORA-2022-167b9becef","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: php-twig3-3.3.8-1.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9","name":"https://github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9","refsource":"MISC","tags":[],"title":"bug #3641 Disallow non closures in `sort` filter when the sanbox mode… · twigphp/Twig@22b9dc3 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7/","name":"FEDORA-2022-167b9becef","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: php-twig3-3.3.8-1.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZ/","name":"FEDORA-2022-47293b1d23","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 34 Update: php-twig2-2.14.11-1.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5","name":"https://github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5","refsource":"MISC","tags":[],"title":"Disallow non closures in `sort` filter when the sanbox mode is enabled · twigphp/Twig@2eb3308 · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSAD/","name":"FEDORA-2022-58abb323f0","refsource":"","tags":[],"title":"[SECURITY] Fedora 35 Update: php-twig2-2.14.11-1.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://www.debian.org/security/2022/dsa-5107","name":"DSA-5107","refsource":"DEBIAN","tags":[],"title":"Debian -- Security Information -- DSA-5107-1 php-twig","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO/","name":"FEDORA-2022-7d871d7583","refsource":"","tags":[],"title":"[SECURITY] Fedora 35 Update: php-twig3-3.3.8-1.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSAD/","name":"FEDORA-2022-58abb323f0","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 35 Update: php-twig2-2.14.11-1.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZ/","name":"FEDORA-2022-47293b1d23","refsource":"","tags":[],"title":"[SECURITY] Fedora 34 Update: php-twig2-2.14.11-1.fc34 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"200"},{"url":"https://github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2v","name":"https://github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2v","refsource":"CONFIRM","tags":[],"title":"Disallow non closures in `sort` filter when the sandbox mode is enabled · Advisory · twigphp/Twig · GitHub","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO/","name":"FEDORA-2022-7d871d7583","refsource":"FEDORA","tags":[],"title":"[SECURITY] Fedora 35 Update: php-twig3-3.3.8-1.fc35 - package-announce - Fedora Mailing-Lists","mime":"text/html","httpstatus":"200","archivestatus":"404"},{"url":"https://www.cve.org/CVERecord?id=CVE-2022-23614","name":"CVE Program record","refsource":"CVE.ORG","tags":["canonical"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-23614","name":"NVD vulnerability detail","refsource":"NVD","tags":["canonical","analysis"]}],"affected":[],"timeline":[],"solutions":[],"workarounds":[],"exploits":[],"credits":[],"nvd_cpes":[{"cve_year":"2022","cve_id":"23614","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"debian","cpe5":"debian_linux","cpe6":"11.0","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"23614","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"34","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"23614","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"o","cpe4":"fedoraproject","cpe5":"fedora","cpe6":"35","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"},{"cve_year":"2022","cve_id":"23614","vulnerable":"1","versionEndIncluding":"","cpe1":"cpe","cpe2":"2.3","cpe3":"a","cpe4":"symfony","cpe5":"twig","cpe6":"*","cpe7":"*","cpe8":"*","cpe9":"*","cpe10":"*","cpe11":"*","cpe12":"*","cpe13":"*"}],"vendor_comments":[],"enrichments":{"kev":null,"epss":null,"legacy_qids":[{"cve":"CVE-2022-23614","qid":"179157","title":"Debian Security Update for php-twig (DSA 5107-1)"},{"cve":"CVE-2022-23614","qid":"182133","title":"Debian Security Update for php-twig (CVE-2022-23614)"},{"cve":"CVE-2022-23614","qid":"199472","title":"Ubuntu Security Notification for Twig Vulnerabilities (USN-5947-1)"},{"cve":"CVE-2022-23614","qid":"282377","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-167b9becef)"},{"cve":"CVE-2022-23614","qid":"282378","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-7d871d7583)"},{"cve":"CVE-2022-23614","qid":"282379","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-58abb323f0)"},{"cve":"CVE-2022-23614","qid":"282380","title":"Fedora Security Update for Hypertext Preprocessor (PHP) (FEDORA-2022-47293b1d23)"}]},"source_records":{"cve_program":{"CVE_data_meta":{"ASSIGNER":"security-advisories@github.com","ID":"CVE-2022-23614","STATE":"PUBLIC","TITLE":"Code injection in Twig"},"affects":{"vendor":{"vendor_data":[{"product":{"product_data":[{"product_name":"Twig","version":{"version_data":[{"version_value":">= 3.0.0, < 3.3.8"},{"version_value":">= 2.0.0, < 2.14.11"}]}}]},"vendor_name":"twigphp"}]}},"data_format":"MITRE","data_type":"CVE","data_version":"4.0","description":{"description_data":[{"lang":"eng","value":"Twig is an open source template language for PHP. When in a sandbox mode, the `arrow` parameter of the `sort` filter must be a closure to avoid attackers being able to run arbitrary PHP functions. In affected versions this constraint was not properly enforced and could lead to code injection of arbitrary PHP code. Patched versions now disallow calling non Closure in the `sort` filter as is the case for some other filters. Users are advised to upgrade."}]},"impact":{"cvss":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"HIGH","baseScore":8.8,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"HIGH","privilegesRequired":"LOW","scope":"UNCHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","version":"3.1"}},"problemtype":{"problemtype_data":[{"description":[{"lang":"eng","value":"CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"}]}]},"references":{"reference_data":[{"name":"https://github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2v","refsource":"CONFIRM","url":"https://github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2v"},{"name":"https://github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9","refsource":"MISC","url":"https://github.com/twigphp/Twig/commit/22b9dc3c03ee66d7e21d9ed2ca76052b134cb9e9"},{"name":"https://github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5","refsource":"MISC","url":"https://github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5"},{"refsource":"FEDORA","name":"FEDORA-2022-167b9becef","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7/"},{"refsource":"FEDORA","name":"FEDORA-2022-47293b1d23","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZ/"},{"refsource":"FEDORA","name":"FEDORA-2022-7d871d7583","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO/"},{"refsource":"FEDORA","name":"FEDORA-2022-58abb323f0","url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSAD/"},{"refsource":"DEBIAN","name":"DSA-5107","url":"https://www.debian.org/security/2022/dsa-5107"}]},"source":{"advisory":"GHSA-5mv2-rx3q-4w2v","discovery":"UNKNOWN"}},"nvd":{"publishedDate":"2022-02-04 23:15:00","lastModifiedDate":"2023-11-07 03:44:00","problem_types":["CWE-94"],"metrics":{"baseMetricV3":{"cvssV3":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH","baseScore":9.8,"baseSeverity":"CRITICAL"},"exploitabilityScore":3.9,"impactScore":5.9},"baseMetricV2":{"cvssV2":{"version":"2.0","vectorString":"AV:N/AC:L/Au:N/C:P/I:P/A:P","accessVector":"NETWORK","accessComplexity":"LOW","authentication":"NONE","confidentialityImpact":"PARTIAL","integrityImpact":"PARTIAL","availabilityImpact":"PARTIAL","baseScore":7.5},"severity":"HIGH","exploitabilityScore":10,"impactScore":6.4,"acInsufInfo":false,"obtainAllPrivilege":false,"obtainUserPrivilege":false,"obtainOtherPrivilege":false,"userInteractionRequired":false}},"configurations":{"CVE_data_version":"4.0","nodes":[{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*","versionStartIncluding":"3.0.0","versionEndExcluding":"3.3.8","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:a:symfony:twig:*:*:*:*:*:*:*:*","versionStartIncluding":"2.0.0","versionEndExcluding":"2.14.11","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:34:*:*:*:*:*:*:*","cpe_name":[]},{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:*","cpe_name":[]}]},{"operator":"OR","children":[],"cpe_match":[{"vulnerable":true,"cpe23Uri":"cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*","cpe_name":[]}]}]}},"legacy_mitre":{"record":{"CveYear":"2022","CveId":"23614","Ordinal":"226449","Title":"CVE-2022-23614","CVE":"CVE-2022-23614","Year":"2022"},"notes":[{"CveYear":"2022","CveId":"23614","Ordinal":"1","NoteData":"Twig is an open source template language for PHP. When in a sandbox mode, the `arrow` parameter of the `sort` filter must be a closure to avoid attackers being able to run arbitrary PHP functions. In affected versions this constraint was not properly enforced and could lead to code injection of arbitrary PHP code. Patched versions now disallow calling non Closure in the `sort` filter as is the case for some other filters. Users are advised to upgrade.","Type":"Description","Title":null},{"CveYear":"2022","CveId":"23614","Ordinal":"2","NoteData":"2022-02-04","Type":"Other","Title":"Published"},{"CveYear":"2022","CveId":"23614","Ordinal":"3","NoteData":"2022-02-12","Type":"Other","Title":"Modified"}]}}}