CVE-2021-29454 | Sandbox Escape by math function in smarty

Smarty is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. Prior to versions 3.1.42 and 4.0.2, template authors could run arbitrary PHP code by crafting a malicious math string. If a math string was passed through as user provided data to the math function, external users could run arbitrary PHP code by crafting a malicious math string. Users should upgrade to version 3.1.42 or 4.0.2 to receive a patch.

公開: 2022-01-10 最終更新: 2026-06-16 Assigner: [email protected] ソース: [email protected]

総合評価: CVE-2021-29454 は中リスク(60.7/100)。CVSS 深刻度は高。悪用される可能性が高い(EPSS 1.93%、77 パーセンタイル) 根拠: 直近 1 日で EPSS が +1.28% 上昇。悪用への関心が高まっている可能性があります。 推奨対応: 影響資産を整理し、修補計画に組み込んでください。

リスクは変動します。再評価に基づき、本ページの表示内容を更新しています。

CVE-2021-29454 の EPSS(Exploit Prediction Scoring System)スコア

EPSS は日次で悪用されやすさの相対度合いを推定します。パーセンタイルは採点済み CVE の中での相対位置(高いほど相対的に深刻)を示します。

# 日付 旧 EPSS スコア 新 EPSS スコア Δ(新 − 旧)
1 2026-06-15 0.64% 1.93% +1.28%
2 2026-01-25 0.40% 0.64% +0.25%
3 2025-12-28 0.40%

EPSS の全履歴 (全 21 件)

CVE-2021-29454 の CVSS(Common Vulnerability Scoring System)指標

この CVE の CVSS 指標。

ベーススコア バージョン 深刻度 ベクトル 悪用しやすさ 影響 スコアの出典
8.1 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N クリックして展開
攻撃ベクター (AV:N)
インターネットなど、ルーティングされたネットワーク越しに遠隔から悪用しうる。端末の前にいる必要はない。
攻撃の複雑さ (AC:L)
攻撃者が条件を満たせば、レース条件や珍しい構成に依存せずに再現しやすい。
必要な権限 (PR:N)
事前のログインや昇格は不要で、匿名アクセスのまま踏み台にしうる。
ユーザーの関与 (UI:R)
インストールの許可、設定変更、悪意あるファイルの実行など、人の一度の判断がトリガーになる。
スコープ (S:U)
影響は脆弱コンポーネントと同一のセキュリティ権限・信頼境界の内側に収まる。
機密性への影響 (C:H)
広範な機微データの読み取りや持ち出しが現実的。
完全性への影響 (I:H)
権限の奪取や広範なログ改竄など、システムの信頼根拠を揺るがす改ざんが現実的。
可用性への影響 (A:N)
業務継続に支障が出るレベルの停止や劣化は想定されない。
2.8 5.2 [email protected]
8.8 3.1 HIGH
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H クリックして展開
攻撃ベクター (AV:N)
インターネットなど、ルーティングされたネットワーク越しに遠隔から悪用しうる。端末の前にいる必要はない。
攻撃の複雑さ (AC:L)
攻撃者が条件を満たせば、レース条件や珍しい構成に依存せずに再現しやすい。
必要な権限 (PR:L)
一般ユーザー権限があれば足り、管理者(root 相当)は不要。
ユーザーの関与 (UI:N)
メールのリンクを開く、マクロを有効にするなど、被害者の協力がなくても成立しうる。
スコープ (S:U)
影響は脆弱コンポーネントと同一のセキュリティ権限・信頼境界の内側に収まる。
機密性への影響 (C:H)
広範な機微データの読み取りや持ち出しが現実的。
完全性への影響 (I:H)
権限の奪取や広範なログ改竄など、システムの信頼根拠を揺るがす改ざんが現実的。
可用性への影響 (A:H)
長時間のサービス停止、データ損壊による復旧不能に近い状態など、利用者に著しい不便を与えうる。
2.8 5.9 [email protected]
6.5 2.0 MEDIUM
AV:N/AC:L/Au:S/C:P/I:P/A:P クリックして展開
アクセス経路 (AV:N)
ルーティング可能なネットワーク越しに、遠隔から到達・悪用しうる。
アクセスの複雑さ (AC:L)
手順が短く、再現性が高い。
認証 (AU:S)
一度の認証(シングルサインオン含む)を突破すればよい。
機密性への影響 (C:P)
機密性は部分的に損なわれる。
完全性への影響 (I:P)
完全性は部分的に損なわれる。
可用性への影響 (A:P)
可用性は部分的に損なわれる。
8.0 6.4 [email protected]

CVE-2021-29454 の弱点分類(列挙)

CVE-2021-29454 の GitHub Security Advisory

GHSA-29gp-2c3m-3j6m · 深刻度: high · エコシステム: composer — Sandbox Escape by math function in smarty

CVE-2021-29454 の OS トラッカー

vendor priority summary link
debian not yet assigned CVE-2021-29454 not yet assigned priority: Debian including 2 source packages (smarty3, smarty4), 9 status rows across 5 suites (bookworm, bullseye, forky, sid, trixie): resolved 9. https://security-tracker.debian.org/tracker/CVE-2021-29454
gentoo normal CVE-2021-29454: 1 GLSA(s) (202209-09), 1 atom(s) (dev-php/smarty); latest impact normal. https://bugs.gentoo.org/buglist.cgi?quicksearch=CVE-2021-29454
ubuntu high CVE-2021-29454 high priority: Ubuntu including 1 source packages (smarty3), 14 status rows across 14 suites (bionic, focal, hirsute, impish, jammy, kinetic, lunar, mantic, noble, oracular, plucky, trusty, upstream, xenial): released 12, DNE 1, ignored 1. https://ubuntu.com/security/CVE-2021-29454

CVE-2021-29454 の影響を受けるソフトウェア/構成

ベンダー 製品 バージョン 生の CPE
smarty smarty < 3.1.42 cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*
smarty smarty >= 4.0.0, < 4.0.2 cpe:2.3:a:smarty:smarty:*:*:*:*:*:*:*:*
debian debian_linux 9.0 cpe:2.3:o:debian:debian_linux:9.0:*:*:*:*:*:*:*
debian debian_linux 10.0 cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*
debian debian_linux 11.0 cpe:2.3:o:debian:debian_linux:11.0:*:*:*:*:*:*:*
fedoraproject fedora 36 cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:*
fedoraproject fedora 37 cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*

CVE-2021-29454 の参考情報

URL タグ
https://github.com/smarty-php/smarty/commit/215d81a9fa3cd63d82fb3ab56ecaf97cf1e7db71 Patch Third Party Advisory
https://github.com/smarty-php/smarty/releases/tag/v3.1.42 Release Notes Third Party Advisory
https://github.com/smarty-php/smarty/releases/tag/v4.0.2 Release Notes Third Party Advisory
https://github.com/smarty-php/smarty/security/advisories/GHSA-29gp-2c3m-3j6m Third Party Advisory
https://lists.debian.org/debian-lts-announce/2022/05/msg00005.html Mailing List Third Party Advisory
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/BRAJVDRGCIY5UZ2PQHKDTT7RMKG6WJQQ/
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/L777JIBIWJV34HS7LXPIDWASG7TT4LNI/
https://packagist.org/packages/smarty/smarty Product Third Party Advisory
https://security.gentoo.org/glsa/202209-09 Third Party Advisory
https://www.debian.org/security/2022/dsa-5151 Third Party Advisory
https://www.smarty.net/docs/en/language.function.math.tpl Vendor Advisory
cvelogic Threat Intelligence