Skip to content
Access control Write-up Intermediate

Plug Security Holes in React Apps That Can Lead to API Exploitation

The Siemens AMA Cloud React application used a client-side JWT for user information but did not send it to the API server, and the server-side APIs lacked authentication. An attacker could modify the client-side JavaScript to bypass the Microsoft SSO redirect, create a fake JWT with admin privileges, and gain full access to the application and its data.

Eaton Z Follow

Published on thenewstack.io

Over the past several years, React and Angular JavaScript frameworks have been among the most popular choices for developers building data-driven enterprise websites and applications. While these frameworks are robust and provide built-in security features, mistakes can still be made that could lead to security issues.

Eaton Zveare, on thenewstack.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

The server-side APIs did not require or validate authentication tokens, relying solely on client-side checks that could be bypassed.

Impact

An attacker could gain full administrative access to the application and its data, as all APIs were unauthenticated and accepted requests without a valid token.

What the attacker needed

Ability to modify client-side JavaScript; no valid Microsoft account needed

How it was found

  1. Load the React application and view its source code during the brief window before the Microsoft SSO redirect.
  2. Modify the client-side JavaScript to comment out the redirect to the SSO provider.
  3. Discover an unauthenticated getUsers API endpoint that provided user information.
  4. Create a fake JWT with admin-level user information and place it in the browser's session storage.
  5. Load the application with the modified JavaScript and fake token to gain full access.

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.

This report describes a web application that checked login only in the user's browser, not on the server. The server accepted requests without proof of identity, so anyone could pretend to be an administrator by editing the browser's stored login token. The fix was to make the server require and verify a valid token for every request.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

More by Eaton Z

View all

10 more disclosed reports, best first.

More from Siemens

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.