VOOZH about

URL: https://thenewstack.io/oxeye-finds-bad-spotify-backstage-javascript-vulnerability/

⇱ Oxeye Finds Bad Spotify Backstage JavaScript Vulnerability - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2022-11-18 08:22:41
Oxeye Finds Bad Spotify Backstage JavaScript Vulnerability
Security / Software Development

Oxeye Finds Bad Spotify Backstage JavaScript Vulnerability

Cloud native security company Oxeye discovered a 10.0 CVSS vulnerability in Spotify Backstage platform for building developer portals.
Nov 18th, 2022 8:22am by Steven J. Vaughan-Nichols
👁 Featued image for: Oxeye Finds Bad Spotify Backstage JavaScript Vulnerability

How bad? Is a Common Vulnerability Scoring System (CVSS) score of 10.0 bad enough for you?

These days with security holes appearing fast and furious it takes a truly exceptional security bug to catch my eye. However, cloud native security company Oxeye‘s discovery of a 10.0 CVSS vulnerability, (CVE-2022-36067) in a Spotify Backstage third-party modulus flashes like a burst of sunlight on a gray, cloudy day.

In case you’ve forgotten, a 10 has a potentially huge impact, and it’s a critical bug. In other words: “Fix it. Fix it now.”

Backstage In Use

This isn’t just a worry for Spotify users and programmers. Backstage unifies many infrastructure tools and services in a development environment also used by American Airlines, Netflix, Splunk, Fidelity Investments, Epic Games, and many, many others. Backstage is also used to hold integration details in such systems as Prometheus, Jira, ElasticSearch, and others — including, of course, quite possibly your projects.

Key Weakness

Backstage’s key weakness was found in its software templates. Each template is defined by a YAML file that resembles a Kubernetes resource. It contains the fields that define how components should act. The data provided to the message parameter is a template rendered by Mozilla Nunjucks. This works with JavaScript-based applications. Its basic idea comes from Jinja2, the Python template engine.

So far, so good. Oxeye, however, noticed that Nunjacks could be manipulated to run shell commands by using user-controlled templates. To lock down potential trouble from these shell commands, Backstage began using the vm2 JavaScript sandbox library.

But it turns out, there’s a way to escape from vm2. Once out, an attacker can run a remote code execution (RCE) on the host. As always, this is bad news.

But the next question was, “Could this exploit work within Backstage?” The answer: “Yes, yes, it could.”

Out of the Sandbox

By using the template to force Nunjacks to run SecureTemplater.render function twice, an attack could break out of the sandbox. That done, an attacker can create an object outside the sandbox, such as an executable arbitrary system command. That done, it’s too late to block the attacker because they’re inside and off to cause mischief.

OK, that’s bad. But there was worse to come. It turns out that when you deploy Backstage by default, it has no authentication mechanism. That’s asking for trouble. And, sure enough, Oxeye researchers found that “some of the public Backstage servers accessible to the internet did not require any authentication.”

Whoops.

Adding insult to injury, if you did add authentication, without additional work, it only enforced authentication on the client side. A request coming in from the backend API was not verified for authentication or for authorization.

Can we say “Whoops” again? Why, yes, we can.

The Fix

To fix the immediate problem, you should upgrade vm2 version 3.9.11. Well, what are you waiting for? Go and patch!

Oxeye also warns, however, there’s a bigger problem here. We assume sandboxes are safe. I mean, that is the name of their game. But, as this episode shows, that’s not always a safe assumption.

Oxeye recommends that if you must use a sandbox, you separate the logical, sensitive part of your application from the microservice that runs the sandbox code. That way, even if a hacker breaks out, their attack surface is limited to the isolated microservice.

The company also warns that you should “avoid using a sandbox that relies on a dynamic programming language such as JavaScript when possible. The dynamic nature of the language widens the attack surface for a potential attacker.” That’s a good point, and I recommend you take a close look at your sandboxes and see if there are better, safer alternatives for your projects.

TRENDING STORIES
Steven J. Vaughan-Nichols, aka sjvn, has been writing about technology and the business of technology since CP/M-80 was the cutting-edge PC operating system, 300bps was a fast internet connection, WordStar was the state-of-the-art word processor, and we liked it.
Read more from Steven J. Vaughan-Nichols
SHARE THIS STORY
TRENDING STORIES
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.