{"id":"CVE-2022-27772","aliases":["CLSA-2026-1783991067","CLSA-2026-1794195758","CLSA-2026-1794275759","EUVD-2022-6319","GHSA-cm59-pr5q-cw85"],"status":"published","title":"Temporary Directory Hijacking to Local Privilege Escalation Vulnerability in org.springframework.boot:spring-boot","description":"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. NOTE: This vulnerability only affects products and/or versions that are no longer supported by the maintainer","severity":{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-10","score":0.00597,"percentile":0.48921,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":true,"fix_available":true},"cwes":["CWE-377","CWE-379","CWE-668"],"published":"2022-03-30T17:45:42Z","modified":"2026-11-10T07:15:02Z","exploits":[{"source":"pocgithub","id":"puneetbehl/grails3-cve-2022-27772","title":"puneetbehl/grails3-cve-2022-27772","date":"2022-04-18","url":"https://github.com/puneetbehl/grails3-cve-2022-27772"}],"fixes":[{"ecosystem":"Maven","package":"org.springframework.boot:spring-boot","fixed_in":["2.2.11.RELEASE"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Maven","package":"org.springframework.boot:spring-boot","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"2.2.10.RELEASE"},{"fixed":"2.2.11.RELEASE"}]}]},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.8.RELEASE"},{"fixed":"2.1.8.RELEASE-tuxcare.1"}]}],"versions":["2.1.8.RELEASE"],"bundled":9},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-actuator","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.8.RELEASE"},{"fixed":"2.1.8.RELEASE-tuxcare.1"}]}],"versions":["2.1.8.RELEASE"],"bundled":9},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-actuator-autoconfigure","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.8.RELEASE"},{"fixed":"2.1.8.RELEASE-tuxcare.1"}]}],"versions":["2.1.8.RELEASE"],"bundled":9},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-autoconfigure","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.8.RELEASE"},{"fixed":"2.1.8.RELEASE-tuxcare.1"}]}],"versions":["2.1.8.RELEASE"],"bundled":9},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-devtools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.8.RELEASE"},{"fixed":"2.1.8.RELEASE-tuxcare.1"}]}],"versions":["2.1.8.RELEASE"],"bundled":9},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-loader","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.8.RELEASE"},{"fixed":"2.1.8.RELEASE-tuxcare.1"}]}],"versions":["2.1.8.RELEASE"],"bundled":9},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-starter-actuator","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.8.RELEASE"},{"fixed":"2.1.8.RELEASE-tuxcare.1"}]}],"versions":["2.1.8.RELEASE"],"bundled":9},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.3.RELEASE"},{"fixed":"2.0.3.RELEASE-tuxcare.1"}]}],"versions":["2.0.3.RELEASE"],"bundled":10},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-actuator","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.3.RELEASE"},{"fixed":"2.0.3.RELEASE-tuxcare.1"}]}],"versions":["2.0.3.RELEASE"],"bundled":10},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-actuator-autoconfigure","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.3.RELEASE"},{"fixed":"2.0.3.RELEASE-tuxcare.1"}]}],"versions":["2.0.3.RELEASE"],"bundled":10},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-autoconfigure","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.3.RELEASE"},{"fixed":"2.0.3.RELEASE-tuxcare.1"}]}],"versions":["2.0.3.RELEASE"],"bundled":10},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-devtools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.3.RELEASE"},{"fixed":"2.0.3.RELEASE-tuxcare.1"}]}],"versions":["2.0.3.RELEASE"],"bundled":10},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-starter-actuator","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.0.3.RELEASE"},{"fixed":"2.0.3.RELEASE-tuxcare.1"}]}],"versions":["2.0.3.RELEASE"],"bundled":10},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.18.RELEASE"},{"fixed":"2.1.18.RELEASE-tuxcare.1"}]}],"versions":["2.1.18.RELEASE"],"bundled":7},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-actuator","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.18.RELEASE"},{"fixed":"2.1.18.RELEASE-tuxcare.1"}]}],"versions":["2.1.18.RELEASE"],"bundled":7},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-actuator-autoconfigure","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.18.RELEASE"},{"fixed":"2.1.18.RELEASE-tuxcare.1"}]}],"versions":["2.1.18.RELEASE"],"bundled":7},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-devtools","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.18.RELEASE"},{"fixed":"2.1.18.RELEASE-tuxcare.1"}]}],"versions":["2.1.18.RELEASE"],"bundled":7},{"source":"osv","ecosystem":"TuxCare:Maven","package":"org.springframework.boot:spring-boot-loader","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"2.1.18.RELEASE"},{"fixed":"2.1.18.RELEASE-tuxcare.1"}]}],"versions":["2.1.18.RELEASE"],"bundled":7},{"source":"osv","ecosystem":"Maven","package":"org.springframework.boot:spring-boot","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.11.RELEASE"}]}],"versions":["1.0.0.RELEASE","1.0.1.RELEASE","1.0.2.RELEASE","1.1.0.RELEASE","1.1.1.RELEASE","1.1.10.RELEASE","1.1.11.RELEASE","1.1.12.RELEASE","1.1.2.RELEASE","1.1.3.RELEASE","1.1.4.RELEASE","1.1.5.RELEASE","1.1.6.RELEASE","1.1.7.RELEASE","1.1.8.RELEASE","1.1.9.RELEASE","1.2.0.RELEASE","1.2.1.RELEASE","1.2.2.RELEASE","1.2.3.RELEASE","1.2.4.RELEASE","1.2.5.RELEASE","1.2.6.RELEASE","1.2.7.RELEASE","1.2.8.RELEASE","1.3.0.RELEASE","1.3.1.RELEASE","1.3.2.RELEASE","1.3.3.RELEASE","1.3.4.RELEASE","1.3.5.RELEASE","1.3.6.RELEASE","1.3.7.RELEASE","1.3.8.RELEASE","1.4.0.RELEASE","1.4.1.RELEASE","1.4.2.RELEASE","1.4.3.RELEASE","1.4.4.RELEASE","1.4.5.RELEASE","1.4.6.RELEASE","1.4.7.RELEASE","1.5.0.RELEASE","1.5.1.RELEASE","1.5.10.RELEASE","1.5.11.RELEASE","1.5.12.RELEASE","1.5.13.RELEASE","1.5.14.RELEASE","1.5.15.RELEASE","1.5.16.RELEASE","1.5.17.RELEASE","1.5.18.RELEASE","1.5.19.RELEASE","1.5.2.RELEASE","1.5.20.RELEASE","1.5.21.RELEASE","1.5.22.RELEASE","1.5.3.RELEASE","1.5.4.RELEASE","1.5.5.RELEASE","1.5.6.RELEASE","1.5.7.RELEASE","1.5.8.RELEASE","1.5.9.RELEASE","2.0.0.RELEASE","2.0.1.RELEASE","2.0.2.RELEASE","2.0.3.RELEASE","2.0.4.RELEASE","2.0.5.RELEASE","2.0.6.RELEASE","2.0.7.RELEASE","2.0.8.RELEASE","2.0.9.RELEASE","2.1.0.RELEASE","2.1.1.RELEASE","2.1.10.RELEASE","2.1.11.RELEASE","2.1.12.RELEASE","2.1.13.RELEASE","2.1.14.RELEASE","2.1.15.RELEASE","2.1.16.RELEASE","2.1.17.RELEASE","2.1.18.RELEASE","2.1.2.RELEASE","2.1.3.RELEASE","2.1.4.RELEASE","2.1.5.RELEASE","2.1.6.RELEASE","2.1.7.RELEASE","2.1.8.RELEASE","2.1.9.RELEASE","2.2.0.RELEASE","2.2.1.RELEASE","2.2.10.RELEASE","2.2.2.RELEASE","2.2.3.RELEASE","2.2.4.RELEASE","2.2.5.RELEASE","2.2.6.RELEASE","2.2.7.RELEASE","2.2.8.RELEASE","2.2.9.RELEASE"]}],"products":[{"vendor":"vmware","product":"spring_boot"}],"references":[{"url":"https://github.com/JLLeitschuh/security-research/security/advisories/GHSA-cm59-pr5q-cw85","tags":["x_refsource_MISC","x_transferred","Exploit","Patch","Third Party Advisory","advisory","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2022-27772","tags":["advisory"]},{"url":"https://github.com/spring-projects/spring-boot/commit/667ccdae84822072f9ea1a27ed5c77964c71002d","tags":["web"]},{"url":"https://github.com/advisories/GHSA-cm59-pr5q-cw85"},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/27xxx/CVE-2022-27772.json","tags":["advisory"]},{"url":"https://github.com/spring-projects/spring-boot","tags":["package"]}],"sources":{"cve":[{"id":"CVE-2022-27772","description":"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. NOTE: This vulnerability only affects products and/or versions that are no longer supported by the maintainer","status":"published","published":"2022-03-30T17:45:42Z","modified":"2024-08-03T05:32:59.831Z","updated_at":"2026-11-02T14:34:34.250357Z"}],"euvd":[{"id":"EUVD-2022-6319","description":"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. NOTE: This vulnerability only affects products and/or versions that are no longer supported by the maintainer","status":"published","published":"2022-03-30T17:45:42Z","modified":"2024-08-03T05:32:59Z","updated_at":"2026-11-03T03:25:42.489853Z"}],"ghsa":[{"id":"GHSA-cm59-pr5q-cw85","title":"Temporary Directory Hijacking to Local Privilege Escalation Vulnerability in org.springframework.boot:spring-boot","description":"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.\n\nThe 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).\n\n#### Impact Location\n\nThis vulnerability impacted the following source location:\n\n```java\n\t/**\n\t * Return the absolute temp dir for given web server.\n\t * @param prefix server name\n\t * @return the temp dir for given server.\n\t */\n\tprotected final File createTempDir(String prefix) {\n\t\ttry {\n\t\t\tFile tempDir = File.createTempFile(prefix + \".\", \".\" + getPort());\n\t\t\ttempDir.delete();\n\t\t\ttempDir.mkdir();\n\t\t\ttempDir.deleteOnExit();\n\t\t\treturn tempDir;\n\t\t}\n```\n\\- https://github.com/spring-projects/spring-boot/blob/ce70e7d768977242a8ea6f93188388f273be5851/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/AbstractConfigurableWebServerFactory.java#L165-L177\n\nThis 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:\n\n```java\nFile tmpDir =File.createTempFile(prefix + \".\", \".\" + getPort()); // Attacker knows the full path of the file that will be generated\n// delete the file that was created\ntmpDir.delete(); // Attacker sees file is deleted and begins a race to create their own directory before Jetty.\n// and make a directory of the same name\n// SECURITY VULNERABILITY: Race Condition! - Attacker beats java code and now owns this directory\ntmpDir.mkdirs(); // This method returns 'false' because it was unable to create the directory. No exception is thrown.\n// Attacker can write any new files to this directory that they wish.\n// Attacker can read any files created by this process.\n```\n\n### Prerequisites\n\nThis vulnerability impacts Unix-like systems, and very old versions of Mac OSX and Windows as they all share the system temporary directory between all users.\n\n### Patches\n\nThis vulnerability was inadvertently fixed as a part of this patch: https://github.com/spring-projects/spring-boot/commit/667ccdae84822072f9ea1a27ed5c77964c71002d\n\nThis vulnerability is patched in versions `v2.2.11.RELEASE` or later.\n\n### Workarounds\n\nSetting 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.","status":"published","published":"2022-07-11T20:59:02Z","modified":"2023-01-27T05:05:46Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-377","CWE-379","CWE-668"],"updated_at":"2026-11-02T14:36:21.8171Z"}],"nvd":[{"id":"CVE-2022-27772","description":"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. NOTE: This vulnerability only affects products and/or versions that are no longer supported by the maintainer","status":"published","published":"2022-03-30T18:15:08.153Z","modified":"2026-06-17T04:37:28.637Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","level":"high","assessor":"primary"},{"version":"2.0","score":4.6,"vector":"AV:L/AC:L/Au:N/C:P/I:P/A:P","level":"medium","assessor":"primary"}],"cwes":["CWE-668"],"updated_at":"2026-11-02T14:07:14.706146Z"}],"osv":[{"id":"GHSA-cm59-pr5q-cw85","title":"Temporary Directory Hijacking to Local Privilege Escalation Vulnerability in org.springframework.boot:spring-boot","description":"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.\n\nThe 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).\n\n#### Impact Location\n\nThis vulnerability impacted the following source location:\n\n```java\n\t/**\n\t * Return the absolute temp dir for given web server.\n\t * @param prefix server name\n\t * @return the temp dir for given server.\n\t */\n\tprotected final File createTempDir(String prefix) {\n\t\ttry {\n\t\t\tFile tempDir = File.createTempFile(prefix + \".\", \".\" + getPort());\n\t\t\ttempDir.delete();\n\t\t\ttempDir.mkdir();\n\t\t\ttempDir.deleteOnExit();\n\t\t\treturn tempDir;\n\t\t}\n```\n\\- https://github.com/spring-projects/spring-boot/blob/ce70e7d768977242a8ea6f93188388f273be5851/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/server/AbstractConfigurableWebServerFactory.java#L165-L177\n\nThis 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:\n\n```java\nFile tmpDir =File.createTempFile(prefix + \".\", \".\" + getPort()); // Attacker knows the full path of the file that will be generated\n// delete the file that was created\ntmpDir.delete(); // Attacker sees file is deleted and begins a race to create their own directory before Jetty.\n// and make a directory of the same name\n// SECURITY VULNERABILITY: Race Condition! - Attacker beats java code and now owns this directory\ntmpDir.mkdirs(); // This method returns 'false' because it was unable to create the directory. No exception is thrown.\n// Attacker can write any new files to this directory that they wish.\n// Attacker can read any files created by this process.\n```\n\n### Prerequisites\n\nThis vulnerability impacts Unix-like systems, and very old versions of Mac OSX and Windows as they all share the system temporary directory between all users.\n\n### Patches\n\nThis vulnerability was inadvertently fixed as a part of this patch: https://github.com/spring-projects/spring-boot/commit/667ccdae84822072f9ea1a27ed5c77964c71002d\n\nThis vulnerability is patched in versions `v2.2.11.RELEASE` or later.\n\n### Workarounds\n\nSetting 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.","status":"published","published":"2022-07-11T20:59:02Z","modified":"2026-07-08T06:29:40.989423683Z","cvss":[{"version":"3.1","score":7.8,"vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H","level":"high"}],"cwes":["CWE-377","CWE-379","CWE-668"],"updated_at":"2026-11-02T15:46:45.28161Z"},{"id":"CLSA-2026-1783991067","title":"TuxCare security update for org.springframework.boot (9 CVEs)","description":"TuxCare rebuilt 7 org.springframework.boot packages to address 9 CVEs. Fixed in 2.1.8.RELEASE-tuxcare.1.","status":"published","published":"2026-08-04T14:52:43Z","modified":"2026-11-02T19:45:38.77651252Z","updated_at":"2026-11-02T20:30:13.950198Z"},{"id":"CLSA-2026-1794195758","title":"TuxCare security update for org.springframework.boot (10 CVEs)","description":"TuxCare rebuilt 6 org.springframework.boot packages to address 10 CVEs. Fixed in 2.0.3.RELEASE-tuxcare.1.","status":"published","published":"2026-11-09T04:42:39Z","modified":"2026-11-09T07:15:04.226723341Z","updated_at":"2026-11-09T07:20:29.20536Z"},{"id":"CLSA-2026-1794275759","title":"TuxCare security update for org.springframework.boot (7 CVEs)","description":"TuxCare rebuilt 5 org.springframework.boot packages to address 7 CVEs. Fixed in 2.1.18.RELEASE-tuxcare.1.","status":"published","published":"2026-11-10T02:56:00Z","modified":"2026-11-10T07:15:02.338357049Z","updated_at":"2026-11-10T07:24:16.839298Z"},{"id":"CVE-2022-27772","description":"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. NOTE: This vulnerability only affects products and/or versions that are no longer supported by the maintainer","status":"published","published":"2022-03-30T17:45:42Z","modified":"2026-10-28T02:30:55.563094203Z","updated_at":"2026-11-02T15:44:24.758293Z"}]}}
