Skip to content
Access control Write-up Intermediate

I SHALL PASS — Investigating an Authentication Bypass Vulne

The authentication check used unanchored regular expressions against the full request URL, so a GET request to a protected endpoint with a query parameter matching an image path pattern bypassed authentication. An attacker could access some API endpoints without credentials and crash the server by triggering an unhandled error.

Sw1ftB1rd Follow

Published on medium.com

Finding an authentication bypass vulnerability in a web application is a rare event. However, when it happens, it is an issue that must be fixed immediately.

Sw1ftB1rd, on 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

Impact

An unauthenticated attacker could access some API endpoints (returning limited data) and crash the server, causing a denial of service; the bypass did not directly expose sensitive user data because the server crashed before returning it.

What the attacker needed

Network access to the server; No authentication required

The fix

The issue was fixed by the maintainers within a day and a new version was released.

How it was found

  1. Identify the authentication middleware that skips checks for GET requests matching certain regex patterns.
  2. Notice that the regex patterns are not anchored and are tested against the full URL including query parameters.
  3. Send a GET request to a protected endpoint with a query parameter containing a path that matches the ignore pattern.
  4. Observe that the request bypasses authentication and either returns data or causes a server error.

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.

The application tried to skip login checks for image URLs using a pattern match, but the pattern was not anchored to the start of the URL. By adding a query parameter that looked like an image path, an attacker could make other protected pages skip the login check. This let them read some data without logging in and even crash the server.

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.

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.