What Spring Data can teach us about API misconfiguration

January 22, 2021

A security researcher (Joel Noguera @niemand_sec) discovered a ‘critical’ misconfiguration bug in Spring Data’s Application Level Profile Semantics (ALPS). This bug allows unauthenticated users to perform an Application Programming Interface (API) request, which responds with sensitive user data that can be utilized, manipulated, or even deleted.

What is ALPS?

ALPS [is] a data format for defining simple descriptions of application-level semantics, similar in complexity to HTML microformats. An ALPS document can be used as a profile to explain the application semantics of a document with an application-agnostic media type (such as HTML, HAL, Collection+JSON, Siren, etc.). This increases the reusability of profile documents across media types.”


To put it simply, ALPS can be compared to other API definitions such as Swagger.

The main issue with this bug is that Spring Data REST allows developers to set up @Pre and @Post Security Conditions; however, these are not required to perform the queries. Without these permissions in place, unauthenticated users can perform requests that should be protected with authorization mechanisms.

In the Wild: API Authorization Bug

When using Spring Data ALPS, all user profiles can be discovered at this URL:


However, in order to access the JSON schema of the user profiles, a GET Request must be sent with this header:

Accept: application/schema+json

Luckily, this is detailed in Spring Data’s documentation: https://docs.spring.io/spring-data/rest/docs/current/reference/html/#metadata.json-schema

When issuing an unauthenticated GET request to retrieve user data, the following data will be returned:

curl -H ‘Accept:application/schema+json’ -v http://domain.com/alps/profile/users

< HTTP/1.1 200 OK

< Content-Type: application/hal+json


  “title” : “User type”,

  “properties” : {

        “name” : “company”,

        “type” : “SEMANTIC”

      }, {

        “name” : “nickname”,

        “type” : “SEMANTIC”


  “definitions” : { },

  “type” : “object”,

  “$schema” : “http://json-schema.org/draft-04/schema#


And by removing the /profiles/ section of the URL we can access all user data at:


This is somewhat restricted with a size parameter, which is set to 50 by default. If this parameter is added into the URL, the size can be increased to essentially dump all available user data:


Individual User Profiles can also be accessed at:


Spring Security SpEL Expressions


Disable HTTP METHODS Server Side




  • Browse by Category

  • Clear Form