Skip to content
RCE Write-up Intermediate

Meta bug bounty — One Last Spark AR RCE

A project export file for Spark AR Studio contained an internal zip with a package.json that was loaded by Node.js, allowing lifecycle scripts to run arbitrary commands. An attacker could craft a malicious .arexport file that executes code when opened by a victim.

fadyothman Follow

Published on fadyothman.medium.com

Free Link

Fady Othman, on fadyothman.medium.com

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

Likely the application loaded a package.json from an untrusted project archive using Node.js without disabling lifecycle scripts, allowing arbitrary command execution.

Impact

An attacker could execute arbitrary code on a victim's machine if the victim opens a malicious .arexport file, though the report only demonstrates launching a calculator.

What the attacker needed

Victim opens a malicious .arexport file; attacker can craft a modified .arexport file

How it was found

  1. Install a package from the AR library and save the project as an .arexport file.
  2. Open the .arexport file with 7zip and locate the internal folder containing kitchensink.zip.
  3. Modify the package.json inside kitchensink.zip to add a postinstall script that runs a Node.js file.
  4. Add the malicious JavaScript file to kitchensink.zip.
  5. Open the modified .arexport file with Spark AR Studio to trigger the script.

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.

Spark AR Studio is a tool for making augmented reality effects. It could open project files that included a hidden zip archive with a file that tells a JavaScript tool called Node.js what to do. That file could contain a command that runs when the project is opened, so opening a malicious project file could let someone run their own code on your computer.

What is RCE?

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

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.