Skip to content

Bubble.io security research: 0day / exploiting elasticsearch implementation / Research by: Lucca & Pedro

Notifications You must be signed in to change notification settings

demon-i386/pop_n_bubble

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Security Analysis of Bubble.io Platform: Exposing Elasticsearch Vulnerabilities

Introduction

Bubble.io is a popular no-code platform that enables users to build fully functional applications without needing to write code. While it promises a user-friendly environment, this article takes a closer look at the underlying security mechanisms. We apply offensive security techniques to identify vulnerabilities in the platform, specifically in the way it interacts with Elasticsearch and handles payload encryption.

Vulnerability Discovery

Through reverse engineering the platform's JavaScript code and analyzing the HTTP headers, we discovered a vulnerability that could potentially allow an attacker to execute arbitrary queries against the Elasticsearch instance powering Bubble.io applications.

Technologies Involved:

  • Elasticsearch: Used by Bubble.io to perform database searches.
  • AES-CBC + PBKDF2_HMAC: Encryption methods used to protect requests to Elasticsearch.

Key Findings

  1. Payload Structure:
    The payload consists of three parts:

    • "y": A timestamp, generated by the JavaScript code on the page, encoded in Base64.
    • "x": An IV (Initialization Vector), also generated by JavaScript, encoded in Base64.
    • "z": The encrypted payload, which is a combination of "y" and AppName as the decryption key, and "x" as the IV.
  2. Deserialization of the Payload:
    To decrypt the payload:

    • Obtain the AppName from the X-Bubble-Appname HTTP header.
    • Use the hardcoded IVs ("po9" and "fl1") shared across all Bubble applications.
    • Apply AES decryption using the AppName and IV to decrypt "y" and "x", then use this to decrypt the payload ("z").
  3. Exploit Execution:
    Once decrypted, the payload reveals how queries are structured, allowing an attacker to bypass limitations imposed by the platform (e.g., the number of results returned or certain comparison functions like is equal or is not equal).

  4. Impact:
    With the ability to manipulate queries, an attacker could potentially access all user data from the Elasticsearch database, bypassing security measures such as query restrictions.

Demonstrating the Exploit

The following sequence shows how an attacker could craft a malicious payload to bypass limitations:

  1. A standard query returns one user based on an email address.
  2. By altering the payload, an attacker could remove limitations on results, retrieving all user data in one response.

Example Payload Before and After Modification:

  • Original Payload: Returns a limited set of data (e.g., one user).
  • Modified Payload: Retrieves all users and their associated information.

Conclusion

Bubble.io’s no-code platform is not immune to security risks, as demonstrated by the vulnerabilities found in its use of Elasticsearch and cryptographic mechanisms. While no-code solutions are powerful, it’s important to understand the underlying systems and their potential weaknesses. This case highlights the need for developers and users of such platforms to consider security as an integral part of their development process.

Final Thoughts:

Even though no-code platforms like Bubble.io make it easy to build applications, a lack of awareness about the security implications can lead to severe vulnerabilities. Developers must stay vigilant and take the necessary steps to safeguard sensitive data.


Note: This analysis is intended to raise awareness about security flaws in no-code platforms and encourage developers to take security seriously, regardless of the tools they use.

About

Bubble.io security research: 0day / exploiting elasticsearch implementation / Research by: Lucca & Pedro

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages