Skip to content
Access control Write-up Beginner

My first CVE-2022–31289

The login page of Sonatype Nexus Repository Manager OSS 3.37.3-02 could be bypassed by changing the HTTP response status code from 403 to 200, allowing an attacker to log in as admin with random credentials.

Praveen Mali Follow

Published on web.archive.org

Hello My name is Praveen Mali and in this writeup I am going to share my first CVE Id Story.

Praveen Mali, on web.archive.org

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 relied on the client-supplied HTTP status code to decide whether authentication succeeded, instead of validating credentials server-side.

Impact

An attacker could log in as admin without valid credentials, gaining full control of the Nexus Repository Manager.

What the attacker needed

Access to the login page; ability to intercept and modify HTTP responses

How it was found

  1. Go to the Sonatype Nexus login page and click sign in.
  2. Enter random false credentials and capture the request in Burp Suite.
  3. Set Burp to intercept the response to that request.
  4. Observe the response status code is 403 Forbidden.
  5. Change the status code to 200 OK and forward the request.
  6. Observe that you are logged in as admin.

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.

When you log in, the server checks your password and sends back a status code: 403 means 'forbidden' (wrong password) and 200 means 'OK' (success). Here, the server trusted the status code sent by the client, so changing it to 200 tricked the application into thinking the login succeeded.

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.