Skip to content
Path traversal Write-up Intermediate

[BBP系列三] Hijack the JS File of Uber's Website

A path traversal vulnerability in Tealium's template saving endpoint allowed an attacker to modify the JavaScript file utag.js belonging to any account, including Uber's. This could let an attacker inject malicious code into Uber's websites that load that file.

Chaobin Zhang Follow

Published on zhchbin.github.io

Bounty$6,000 View original

I like asking myself some questions when hunting for bug bounty. Looking around about https://tags.tiqcdn.com/utag/uber/main/prod/utag.js, I found Uber’s websites were using a third party service offered by Tealium.

Chaobin Zhang, on zhchbin.github.io

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 server failed to properly sanitise user-supplied path components, allowing directory traversal via '../' sequences in the template path.

Impact

An attacker could modify the JavaScript file loaded by Uber's websites, potentially injecting malicious code that runs in visitors' browsers.

What the attacker needed

Account on the third-party service; knowledge of target account name

The fix

The vulnerability was fixed according to the report.

How it was found

  1. Register two accounts on the third-party service.
  2. Send a request to the saveTemplate endpoint with a null byte in the profile parameter to reveal the server path.
  3. Modify the request body to update the revision.loader value.
  4. Insert '../' sequences into the path to traverse to another account's directory.

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.

Websites often load JavaScript files from third-party services. If an attacker can change the content of such a file, they can run their own code on the website. Here, a flaw in the third-party service let an attacker alter a file used by many sites, including Uber's.

What is Path traversal?

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.

More by Chaobin Zhang

View all

1 more disclosed report, best first.

More from Uber

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Path traversal and file inclusion

The lesson behind this report.

Input that builds a file path escapes the intended folder, reading or writing files the application should never touch.