Skip to content
RCE Disclosed report Advanced

Unauthenticated Remote Code Execution (RCE) via Unsafe Clojure Deserialization on cmr.earthdata.nasa.gov

The NASA Common Metadata Repository used Clojure's read-string function to parse user input in search parameter validation, which evaluates reader macros. An unauthenticated attacker could inject malicious Clojure reader macros into API endpoints to execute arbitrary Java and OS-level commands on the server.

obaskly Follow

Originally disclosed on Bugcrowd

Critical View original
  • Fixed in 17 days
  • Disclosed after 25 days

Summary by obaskly

This report details the discovery and responsible disclosure of a critical, unauthenticated Remote Code Execution (RCE) vulnerability within the NASA Common Metadata Repository (CMR). The vulnerability was caused by the unsafe implementation of Clojure's clojure.core/read-string function, which dynamically evaluated user input within the search parameter validation logic.

By injecting malicious Clojure reader macros into specific API endpoints, an unauthenticated attacker could bypass validation and execute arbitrary Java and OS-level commands on the underlying server. The NASA team rapidly patched the vulnerability by replacing the unsafe function with the secure clojure.edn/read-string alternative, ensuring user input is safely parsed as data rather than executable code.

The original report as published on Bugcrowd, by obaskly. Images and videos are our own copies; raw HTML is shown as text. View it on Bugcrowd.

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

How it worked

Root cause

The application used Clojure's read-string, which evaluates reader macros, on untrusted user input instead of a safe data parser.

Impact

An unauthenticated attacker could execute arbitrary Java and OS-level commands on the underlying server.

What the attacker needed

Network access to the API; no authentication required

The fix

The vulnerability was fixed by replacing the unsafe function with the secure clojure.edn/read-string alternative.

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 report has not been written yet. The Original tab links to the source.

Some programming languages have a function that reads text and turns it into data, but that function can also run code if the text contains special instructions. Here, the server used such a function on input from anyone on the internet, so an attacker could send text that made the server run their commands. This is called remote code execution because the attacker can run code on a distant machine without logging in.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by obaskly

View all

5 more disclosed reports, best first.

More from National Aeronautics and Space Administration (NASA) - Vulnerability Disclosure Program

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.