CVE-2022-23614: Code injection in Twig
Noroxi assessment
Priority: Plan (action score 41/100)
- Public proof-of-concept code exists (GitHub); there is no record of exploitation in the wild.
- Probability of exploitation in the next 30 days: 8.2% (FIRST EPSS); higher than 94.8% of all records.
- Anyone who can reach it over the internet can trigger it. No account or password is required. No user action is required. No special conditions are required; it is repeatable.
- Fixed version: php-twig (Debian:11) 2.14.3-1+deb11u1; php-twig (Debian:12) 3.3.8-1; twig/twig (Packagist) 2.14.11, 3.3.8.
Add it to your regular patch cycle. Upgrade to php-twig (Debian:11) 2.14.3-1+deb11u1; php-twig (Debian:12) 3.3.8-1; twig/twig (Packagist) 2.14.11, 3.3.8 or later.
Generated automatically from the record's data: CVSS (NVD and CNA), CISA KEV and SSVC, FIRST EPSS, exploit sources, fixed versions. How we calculate it
Primary sources: NVD · CVE.org · FIRST EPSS
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.
- Published
- Feb 4, 2022
- Updated
- Jun 17, 2026
- EPSS
- 8.2% · 94th percentile
- CWE
- CWE-74
Report tools
Action score
41
Plan
Add it to your regular patch cycle.
- CVSS
- 39 / 40 · 9.8 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 2 / 30 · 8.2%
CISA SSVC decision
- Exploitation
- none
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- 9.8
- CNA · GitHub_M
- 8.8
- 1.0 point gap
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Get told when this record changes
- Not in KEV: no record of exploitation in the wild
- Proof of concept exists, no weaponized module
- A fix has been released
If any of these changes, we'll tell you in the daily email digest.
Running WordPress? Scan your site free with WP Lens
Noroxi analysis
What does it mean in your environment?
The assessment above is generated automatically from the record's data; it doesn't know your environment. Our team verifies on your systems whether this vulnerability is actually exploitable and which mitigation is enough.
We use this product, ask for helpAffected systems
Is your version affected?
Pick the product and type the version you run. It's compared with this record's version ranges in your browser; the version isn't sent anywhere.
| Vendor | Product | CPE |
|---|---|---|
| symfony | twig | cpe:2.3:a:symfony:twig |
| fedoraproject | fedora | cpe:2.3:o:fedoraproject:fedora |
| debian | debian linux | cpe:2.3:o:debian:debian_linux |
Affected versions
NVD version ranges (for catalog products). Add the product to your stack with a version and matching uses these.
- debian debian linux11.0
- fedoraproject fedora34
- fedoraproject fedora35
- symfony twig2.0.0 and later · before 2.14.11
- symfony twig3.0.0 and later · before 3.3.8
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
twigphp Twig
- >= 3.0.0, < 3.3.8, >= 2.0.0, < 2.14.11affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| Debian:11 | php-twig | before 2.14.3-1+deb11u1 | 2.14.3-1+deb11u1 |
| Debian:12 | php-twig | before 3.3.8-1 | 3.3.8-1 |
| Packagist | twig/twig | from 2.0.0 · before 2.14.11 | 2.14.11 |
| Packagist | twig/twig | from 3.0.0 · before 3.3.8 | 3.3.8 |
Same product
symfony: all recordsOther highest-scoring records for the same primary product.
- CVE-2018-13818Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key parameter.41Plan
- CVE-2026-46640Twig: Arbitrary PHP code execution via `_self.(<string>)` macro-reference compilation34Monitor
- CVE-2026-46633Twig: PHP code injection via `{% use %}` template name34Monitor
Published before and after this one in the same product
- ← EarlierCVE-2015-7809Nov 6, 2015 · The displayBlock function Template.php in Sensio Labs Twig before 1.20.0, when Sandbox mode is enabled, allows remote attackers to execute a28Monitor
- ← EarlierCVE-2019-9942Mar 23, 2019 · A sandbox information disclosure exists in Twig before 1.38.0 and 2.x before 2.7.0 because, under some circumstances, it is possible to call14Monitor
- Later →CVE-2022-39261Sep 28, 2022 · Twig may load a template outside a configured directory when using the filesystem loader31Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| debian:php-twig | 3.3.8-1 · Debian:12 | Package registry (OSV) |
| Packagist:twig/twig | 2.14.11 | Package registry (OSV) |
| Packagist:twig/twig | 3.3.8 | Package registry (OSV) |
Exploit status
Proof of concept available
A public proof of concept or detection signature exists. Exploit knowledge is out there; don't delay patching.
Evidence
- Proof-of-concept repository on GitHub ×2
Noroxi does not host or link to exploit code. Metasploit module names and Nuclei template ids are shown (names, not code); Exploit-DB entries and PoC repositories are given as counts only.
| Source | Kind | Date |
|---|---|---|
| Proof-of-concept repository on GitHub | stars:4 | 2022-07-18 |
| Proof-of-concept repository on GitHub | stars:0 | 2023-07-04 |
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
- Published
- First PoC+163 d
- TodayNov 5, 2026+1735 d
No history yet (it accumulates with the daily EPSS job).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
No nightly-computed relations.
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
—
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- No account or password is required.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-74 · Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvd-primary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Buffer Overflow via Environment VariablesCAPEC-10likelihood: High · High
- Server Side Include (SSI) InjectionCAPEC-101likelihood: High · High
- HTTP Request SplittingCAPEC-105likelihood: Medium · High
- Command Line Execution through SQL InjectionCAPEC-108likelihood: Low · Very High
- Double EncodingCAPEC-120likelihood: Low · Medium
- Subverting Environment Variable ValuesCAPEC-13likelihood: High · Very High
- Format String InjectionCAPEC-135likelihood: High · High
- Client-side Injection-induced Buffer OverflowCAPEC-14likelihood: Medium · High
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
Show all references (7 more)Show less
- github.com/twigphp/Twig/commit/2eb33080558611201b55079d07ac88f207b466d5
- github.com/twigphp/Twig/security/advisories/GHSA-5mv2-rx3q-4w2v
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/I2PVV5DUTRUECTIHMTWRI5Z7DVNYQ2YO/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OTN4273U4RHVIXED64T7DSMJ3VYTPRE7/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/PECHIY2XLWUH2WLCNPDGNFMPHPRPCEDZ/
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/SIGZCFSYLPP7UVJ4E4NLHSOQSKYNXSAD/
- www.debian.org/security/2022/dsa-5107
Vendor advisories and official records. Exploit/PoC links are deliberately left out.