Spring Boot Actuator Exposure
Actuator is the Spring Boot module that exposes the application's internal state over HTTP so monitoring tools can consume it. It is not a vulnerability: it is a feature, and it ships with the application. The problem shows up when those endpoints are reachable unauthenticated, because what they publish is not anonymous telemetry but the inside of the process.
The base path is /actuator (in Spring Boot 1.x they hung off the root: /env, /health, /trace). The index itself lists what is available, so enumeration starts there:
curl -s http://<host>/actuator | jqThe endpoints that give the most, ordered by what they usually hand over:
/actuator/envand/actuator/configprops: environment variables and configuration properties. Connection strings, database credentials and API keys live there. Spring masks what it recognises as a secret with******, but the masking goes by property name, so any key whose name the filter does not know comes out in the clear./actuator/sessions: a JSON with one entry per active session, where the key is the session identifier and the value is the user. A session identifier is a credential: it works as a cookie with no password needed./actuator/heapdump: a dump of the JVM heap, hundreds of megabytes. Open it with Eclipse MAT orjhatand inside is literally everything the process had in memory, tokens and passwords included./actuator/mappings: the application's route map, that is, the list of endpoints no amount of fuzzing was going to find./actuator/gateway/routes(Spring Cloud Gateway): internal routes, and on versions affected by CVE-2022-22947, code execution through SpEL.
Using a stolen session is a cookie and nothing more:
curl -s http://<host>/admin -H 'Cookie: JSESSIONID=<session-id>'Requirements. That management.endpoints.web.exposure.include widens the default allowlist (on Spring Boot 2.x only health and info are exposed out of the box) and that there is no Spring Security in front of the management prefix. An indirect hint that gives the product away is a route answering 500 with the Whitelabel error page, which is what Spring paints when it blows up.
How to detect it. On the server, requests to /actuator/* from addresses that are not the monitoring system's, and very specifically a GET /actuator/heapdump (a several-hundred-megabyte download from a management endpoint has no legitimate use outside an incident). In the access log the pattern is a short, very specific sweep: /actuator, /actuator/env, /actuator/sessions, one after another within seconds. And on the application side, one session used from two different IP addresses at once is the sign that the identifier has been reused.
Defence. Expose only health and info, move management to its own port (management.server.port) reachable only from the monitoring network, and put Spring Security in front of it with a dedicated role. heapdump and env should never be reachable from the network where the end user lives.
It connects with credential hunting, because almost everything /env and /configprops return are credentials written into configuration, and with credential reuse for whatever comes out of there.
Machines where it's used
- CozyHostingHackTheBox