Skip to content
Info disclosure Write-up Beginner

Spring Actuator Security, Part 1: Stealing Secrets Using Spring Actuators

A Spring application exposed all actuator endpoints without authentication, allowing an attacker to read environment variables, change log levels, and download a heap dump. The heap dump contained AWS credentials that were otherwise redacted or not logged.

blog.maass.xyz

Published on blog.maass.xyz

Spring is a set of frameworks for developing Applications in Java. It is widely used, and so it is not unusual to encounter it during a security audit or penetration test.

Max Maass, on blog.maass.xyz

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

The application was configured to expose all actuator endpoints over the web without any authentication.

Impact

An attacker could steal secrets such as database connection strings and AWS credentials, and potentially other sensitive data present in memory.

What the attacker needed

Actuator endpoints exposed without authentication; Network access to the application

The fix

The application should be configured to disable all actuator endpoints that are not actively used, restrict access to the remaining ones with a firewall, and require authentication.

How it was found

  1. Access the actuator index to list enabled endpoints.
  2. Read the environment endpoint to see configuration values.
  3. Change the log level of a specific logger to DEBUG via a POST request.
  4. Retrieve the log file to see debug output containing secrets.
  5. Download the heap dump endpoint to obtain a memory snapshot.
  6. Search the heap dump for secret strings using standard command-line tools.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

Spring Boot Actuator is a feature that adds special web addresses (endpoints) to a Java application so operators can check its health or configuration. If these endpoints are left open to the internet without a password, anyone can read sensitive data or change settings. In this case, an attacker could download the application's memory and find secret keys inside it.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.