Skip to content
RCE Disclosed report Intermediate

Command injection in Harmony trajectory-subsetter (subset.shape GeoJSON) gives any Earthdata user remote code execution (RCE) as root on harmony.earthdata.nasa.gov

The Harmony trajectory-subsetter built a shell command string from a user-supplied GeoJSON shape, and because single quotes inside the shape were not escaped, an attacker could break out of the quoted argument and run arbitrary OS commands. Any holder of a free Earthdata Login account could therefore execute commands as root in the production processing environment.

cl45h Follow

Originally disclosed on Bugcrowd

Critical View original
  • Accepted in 2 days
  • Fixed in 2 months
  • Disclosed after 2 months

Summary by cl45h

Command injection in the NASA Harmony trajectory-subsetter service allowed any holder of a free Earthdata Login account to execute arbitrary OS commands as root inside the production Harmony processing environment.

Root cause

The service builds the subsetter command line as a string. The user supplied GeoJSON shapefile is re-serialized with json.dumps and interpolated into a single quoted argument:

  binary_parameters["--boundingshape"] = f"'{bounding_shape}'"

json.dumps does not escape single quotes, so a quote character inside any GeoJSON property closes the argument. The resulting string was then executed through subprocess.Popen(command, shell=True), so the injected text was interpreted by the shell.

Impact

A single multipart request with a crafted subset.shape polygon achieved command execution as uid=0 inside the production container. The only precondition is a free, self service Earthdata Login account, so the attack surface was effectively public. Confirmed severity: CVSS 3.1 8.8 (AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H), triaged P1.

Testing scope

Activity was limited to read only confirmation that command execution occurs (id, whoami, hostname, uname). No NASA mission or user data was accessed, modified or destroyed, no persistence or interactive shell was established, and no access to any other system was attempted.

Remediation

NASA fixed the issue in the public repository nasa/harmony-trajectory-subsetter, release v1.0.11 (2026-08-28): arguments are now passed as an array with shell=False, and the shape value is no longer wrapped in quotes in the command string.

Timeline

2026-07-03 Reported 2026-07-03 Triaged and replicated by Bugcrowd 2026-07-06 Accepted as valid by NASA 2026-08-28 Fix released publicly (v1.0.11) 2026-09-02 Resolved

The original report as published on Bugcrowd, by cl45h. 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 service interpolated a user-controlled GeoJSON value into a single-quoted shell argument without escaping single quotes, then executed the string with shell=True.

Impact

An attacker with a free account could execute arbitrary OS commands as root in the production Harmony container, though the tester limited activity to read-only confirmation commands.

What the attacker needed

A free Earthdata Login account; ability to send a multipart request

The fix

NASA fixed it in release v1.0.11 by passing arguments as an array with shell=False and no longer wrapping the shape value in quotes.

How it was found

  1. Obtain a free Earthdata Login account.
  2. Send a multipart request to the subsetter with a crafted subset.shape polygon containing a quote character in a GeoJSON property.
  3. The service re-serialises the shape and interpolates it into the command line.
  4. The shell interprets the injected text and runs the attacker's commands as root.

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.

The service took a shape file from the user and pasted it into a command line that the operating system then ran. Because the shape was not properly escaped, a user could include special characters that made the system run extra commands of their choosing. This is called command injection, and here it ran with the highest privileges (root).

What is RCE?

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

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.