Vulnérabilité dans org.springframework.boot:spring-boot (CVE-2022-27772)
Résumé
Vulnérabilité dans org.springframework.boot:spring-boot (CVE-2022-27772). L'exploitation peut entraîner la prise de contrôle totale du système. Exploitable via File.mkdir. Atténuation : mise à jour vers 2.2.11.RELEASE ou plus.
Description d'origine
La description telle que publiée par la source (souvent en anglais).
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…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Résumé généré automatiquement
Assemblé par SecPulse à partir des données sources (CVSS, CWE, versions affectées) à l'aide de modèles, sans IA. Vérifiez la description d'origine et les références ci-dessous.
Une vulnérabilité référencée CVE-2022-27772 a été découverte dans org.springframework.boot:spring-boot.
Des attaquants peuvent cibler un point d'entrée spécifique comme File.mkdir à distance pour détourner le produit.
L'exploitation peut entraîner la prise de contrôle totale du système.
Action : mettez à jour org.springframework.boot:spring-boot vers 2.2.11.RELEASE ou supérieur.
En cas de doute, contactez votre service informatique ou cherchez « org.springframework.boot:spring-boot CVE-2022-27772 » sur le site de l'éditeur.
CVE-2022-27772 (org.springframework.boot:spring-boot) — CWE-377
Vecteur d'attaque : local / sans interaction utilisateur
Surface d'attaque : File.mkdir / false / java.io.tmpdir
Correctif : 2.2.11.RELEASE — appliquer immédiatement
Contournement : 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.
Plan : 1) Audit SBOM, 2) Mise à jour staging→prod, 3) Surveillance WAF/proxy sur les endpoints affectés, 4) Recherche d'IOC dans les logs.
Réfs : voir GHSA / avis éditeur / version corrigée liés sur cette page.
Une vulnérabilité (CWE-377) affecte org.springframework.boot:spring-boot. Les attaquants atteignent le code vulnérable via File.mkdir.
Consultez l'avis de l'éditeur pour les versions affectées de org.springframework.boot:spring-boot. Surface d'attaque : File.mkdir / false / java.io.tmpdir.
Gravité : ?. L'exploitation peut entraîner la prise de contrôle totale du système.
Mettre à jour vers 2.2.11.RELEASE.
Contournement : 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.
Recherchez dans les logs des requêtes correspondant aux IOC connus de cette CVE. Auditez les SBOM/dépendances.
Actions de réponse
Étapes concrètes et exemples de commandes que les équipes SOC/SRE doivent exécuter dans l'ordre
-
1Identify exposure identify
Audit SBOM/dependencies for affected components.資産台帳・SBOM・依存マニフェストで org.springframework.boot:spring-boot を使っているサービスとバージョンを洗い出す。
-
2Apply temporary workaround 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. を実施。回避策の副作用 (機能低下) を確認した上で。 -
3Apply patch patch
Upgrade org.springframework.boot:spring-boot to 2.2.11.RELEASEステージング環境で 2.2.11.RELEASE に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
4Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Paquets affectés
Références
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com