org.springframework.boot:spring-boot の脆弱性 (CVE-2022-27772)
概要
org.springframework.boot:spring-boot に 脆弱性 (CVE-2022-27772) が存在。悪用されるとシステム全体を乗っ取られる可能性があります。File.mkdir 経由で攻撃可能。対策: 2.2.11.RELEASE 以上に更新。
原文の説明
取得元が公開している説明をそのまま載せています (多くは英語)。
spring-boot versions prior to version v2.2.11.RELEASE was vulnerable to temporary directory hijacking. This vulnerability impacted the org.springframework.boot.web.server.AbstractConfigurableWebServerFactory.createTempDir method.
The vulnerable method is used to create a work directory for embedded web servers such as Tomcat and Jetty. The directory contains configuration files, JSP/class files, etc. If a local attacker got the permission to write in this directory, they could completely take over the application (ie. local privilege escalation).
Impact Location
This vulnerability impacted the following source location:
/**
* Return the absolute temp dir for given web server.
* @param prefix server name
* @return the temp dir for given server.
*/
protected final File createTempDir(String prefix) {
try {
File tempDir = File.createTempFile(prefix + ".", "." + getPort());
tempDir.delete();
tempDir.mkdir();
tempDir.deleteOnExit();
return tempDir;
}
This vulnerability exists because File.mkdir returns false when it fails to create a directory, it does not throw an exception. As such, the following race condition exists:
File tmpDir =File.createTempFile(prefix + ".", "." + getPort()); // A…
出典: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
自動生成の要約
取得元のデータ (CVSS・CWE・影響バージョンなど) から SecPulse が定型文で組み立てた要約です。AI は使っていません。正確な内容は下の原文と参照URLで確認してください。
org.springframework.boot:spring-boot という製品で、CVE-2022-27772 という番号がついた弱点 (脆弱性) が見つかりました。
悪い人がインターネット越しに File.mkdir のような特定の入り口を狙うことで、製品の中を不正に操作できてしまいます。
悪用されるとシステム全体を乗っ取られる可能性があります。
対策: org.springframework.boot:spring-boot を 2.2.11.RELEASE 以上に更新してください。
心配なら、システム担当者や製品の公式サイトで「org.springframework.boot:spring-boot CVE-2022-27772」を検索してください。
CVE-2022-27772 (org.springframework.boot:spring-boot) — CWE-377
攻撃ベクター: ローカル / 被害者操作不要
脆弱箇所: File.mkdir / false / java.io.tmpdir
修正バージョン: 2.2.11.RELEASE (即時適用推奨)
暫定回避: Setting the java.io.tmpdir system environment variable to a directory that is exclusively owned by the executing user will fix this vulnerability for all operating systems.
対応方針: 1) SBOMで影響バージョン横断確認, 2) ステージング検証→本番更新, 3) WAF/プロキシで該当エンドポイントを監視, 4) ログでIOC調査。
参考: 当ページの『参照URL』の GHSA / vendor advisory / patched release を参照。
org.springframework.boot:spring-boot に 脆弱性 (CWE-377) があります。攻撃者は File.mkdir を経由して脆弱な処理に到達できます。
org.springframework.boot:spring-boot の影響バージョンはベンダーのアドバイザリで確認してください。攻撃箇所: File.mkdir / false / java.io.tmpdir。
重要度: ?。悪用されるとシステム全体を乗っ取られる可能性があります。
2.2.11.RELEASE に更新してください。
暫定回避: Setting the java.io.tmpdir system environment variable to a directory that is exclusively owned by the executing user will fix this vulnerability for all operating systems.
Webサーバ・プロキシ・WAFログで該当CVEのIOCに合致する不審リクエストを検索。SBOM/依存ファイルで影響バージョンを横断確認。
対応アクション
SOC/SREチームが順番に実行すべき具体的なステップとコマンド例
-
1影響範囲の特定 identify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで org.springframework.boot:spring-boot を使っているサービスとバージョンを洗い出す。
-
2暫定回避策の適用 mitigate
Setting the `java.io.tmpdir` system environment variable to a directory that is exclusively owned by the executing user will fix this vulnerability for all operating systems.パッチが適用されるまでの応急処置として、Setting the
java.io.tmpdirsystem environment variable to a directory that is exclusively owned by the executing user will fix this vulnerability for all operating systems. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3パッチ適用 patch
Upgrade org.springframework.boot:spring-boot to 2.2.11.RELEASEステージング環境で 2.2.11.RELEASE に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4事後検証 verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
影響パッケージ
参照URL
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com