Vulnerability in libphp (CVE-2022-37454)
Summary
vulnerability in libphp (CVE-2022-37454). Successful exploitation can lead to full system takeover. Mitigation: upgrade to `7.4.33, 8.0.25, 8.1.12` or later.
AI summary snake-internal / snake-material-v2
Response Actions (7 steps)
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'libphp' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で `libphp` を grep し、稼働しているサービス・バージョンを把握する。
-
5Apply temporary workaround mitigate
The problem can be avoided by limiting the size of the partial input data (or partial output digest) below 2^32 - 200 bytes.パッチが適用されるまでの応急処置として、The problem can be avoided by limiting the size of the partial input data (or partial output digest) below 2^32 - 200 bytes. を実施。回避策の副作用 (機能低下) を確認した上で。
-
6Apply patch patch
Upgrade libphp to 7.4.33, 8.0.25, 8.1.12ステージング環境で 7.4.33, 8.0.25, 8.1.12 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスと、Step 3 で見つけた異常検知の続報チェックを含めること。
-
7Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番では Step 3 と同じログクエリでアラート再発が無いか継続監視。
Affected packages
References
- advisory https://nvd.nist.gov/vuln/detail/CVE-2022-37454
- advisory https://github.com/advisories/GHSA-6w4m-2xhg-2658
- package https://pypi.org/project/pysha3
- report https://github.com/python/cpython/issues/98517
- web https://csrc.nist.gov/projects/hash-functions/sha-3-project
- web https://eprint.iacr.org/2023/331
- web https://github.com/XKCP/XKCP/security/advisories/GHSA-6w4m-2xhg-2658
- web https://lists.debian.org/debian-lts-announce/2022/10/msg00041.html
- web https://lists.debian.org/debian-lts-announce/2022/11/msg00000.html
- web https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3ALQ6BDDPX5HU5YBQOBMDVAA2TSGDKIJ/
- web https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CMIEXLMTW5GO36HTFFWIPB3OHZXCT3G4/
- web https://mouha.be/sha-3-buffer-overflow/
- web https://news.ycombinator.com/item?id=33281106
- web https://news.ycombinator.com/item?id=35050307
- web https://security.gentoo.org/glsa/202305-02
- web https://security.netapp.com/advisory/ntap-20230203-0001/
- web https://www.debian.org/security/2022/dsa-5267
- web https://www.debian.org/security/2022/dsa-5269
- web https://bugzilla.suse.com/show_bug.cgi?id=CVE-2022-37454
- web https://github.com/XKCP/XKCP/issues/105
- web https://github.com/johanns/sha3/issues/17
- web https://github.com/tiran/pysha3/issues/29
- web https://github.com/XKCP/XKCP/commit/fdc6fef075f4e81d6b1bc38364248975e08e340a
- web https://github.com/johanns/sha3/commit/5f2e8118a62831911703c8753ff2435c3b5d7312
- web https://mouha.be/sha-3-buffer-overflow
- web https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/CMIEXLMTW5GO36HTFFWIPB3OHZXCT3G4
- web https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3ALQ6BDDPX5HU5YBQOBMDVAA2TSGDKIJ
- web https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/CMIEXLMTW5GO36HTFFWIPB3OHZXCT3G4
- web https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/3ALQ6BDDPX5HU5YBQOBMDVAA2TSGDKIJ
- web https://github.com/rubysec/ruby-advisory-db/blob/master/gems/sha3/CVE-2022-37454.yml