Vulnerability · Published Jan 10, 2022 · Assigned by GitHub_M

CVE-2021-21408Access to restricted PHP code by dynamic static class access in smarty

High 8.8

In plain English

A high-severity improper input validation in smarty from smarty-php. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 2.1% (higher than 82% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)8.8High
Exploit odds (30 days)2.1%top 17.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.43 and 4.0.3, template authors could run restricted static php methods. Users should upgrade to version 3.1.43 or 4.0.3 to receive a patch.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12smarty33.1.45-1DEBIAN-CVE-2021-21408
Debian:13smarty33.1.45-1DEBIAN-CVE-2021-21408
Debian:14smarty33.1.45-1DEBIAN-CVE-2021-21408
Debian:12smarty44.1.1-1DEBIAN-CVE-2021-21408
Debian:13smarty44.1.1-1DEBIAN-CVE-2021-21408
Debian:14smarty44.1.1-1DEBIAN-CVE-2021-21408
Packagistsmarty/smarty3.1.43GHSA-4h9c-v5vg-5m6m
Packagistsmarty/smarty4.0.3GHSA-4h9c-v5vg-5m6m
Ubuntu:22.04:LTSsmarty33.1.39-2ubuntu1UBUNTU-CVE-2021-21408

Affected products (as reported)

VendorProductVersions
smarty-php smarty < 3.1.43>= 4.0.0, < 4.0.3

Weakness: CWE-20 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

References