Security features bypass in Twig - CVE-2022-23614

 

Security features bypass in Twig - CVE-2022-23614

Published: March 24, 2022 / Updated: July 18, 2022


Vulnerability identifier: #VU61609
CSH Severity: High
CVSS v4: 9.3 [CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N]
CVE-ID: CVE-2022-23614
CWE-ID: CWE-254
Exploitation vector: Remote access
Exploit availability: Public exploit is available

Vulnerability details

The vulnerability allows a remote attacker to bypass implemented security restrictions.

The vulnerability exists due to missing security restrictions for non closures in "sort" filter when using a sandbox mode. A remote attacker can pass specially crafted data to the application and execute arbitrary PHP code on the system.


Affected software

Twig
php-twig (Debian package)
php-twig (Ubuntu package)
php-twig2
php-twig3
Ubuntu
Fedora

How to mitigate CVE-2022-23614

Install updates from vendor's website.

Twig - addressed in versions 2.14.11, 3.3.8
php-twig (Debian package) - update to 2.14.3-1+deb11u1
php-twig (Ubuntu package) - update to Ubuntu Pro
php-twig2 - addressed in versions 2.14.11-1.fc34, 2.14.11-1.fc35
php-twig3 - addressed in versions 3.3.8-1.fc34, 3.3.8-1.fc35

Links to Public Exploits and PoC-codes

External References

Related Security Bulletins