Skip to content
CSRF Disclosed report Beginner

CSRF - Modify Company Info

The company info editing endpoint lacked a CSRF token, allowing an attacker to forge a request that changes a victim's company details. The attacker could host a malicious page and trick an authenticated user into visiting it, causing unauthorised modification of company information.

ahmd_halabi Follow

Originally disclosed on HackerOne

  • Triaged in 3 hours
  • Fixed in 40 days
  • Disclosed after 49 days

Target Url ███/services/user/manageAccountCompany

Summary: Similar to███████, but on different endpoint. The application is missing CSRF Token on Editing company info endpoint. This lead to CSRF attack.

Bypassing Content-Type The application is just accepting Content-Type as application/json. This can be bypassed in several ways. One of the ways is to Forge Content-Type header with flash. You need a flash file capable of sending cross-domain requests and a 307 redirector page. For more info please see: https://blog.cm2.pw/forging-content-type-header-with-flash/

Step-by-step Reproduction Instructions

  1. Edit your company info and intercept its request.
  2. Get the HTML code format from burp suite -> Engagement Tools -> Generate CSRF POC.
  3. Click Test in Browser button, and on another browser/tab accessed by the victim account, paste the link.
  4. Now hit on the button and intercept its request.
  5. Modify the request header of Content-Type to: application/json.
  6. Forward the request and CSRF exploited successfully and the info changed successfully.

Suggested Mitigation/Remediation Actions

Add a csrf-token in the header or in an hidden input to check if the user that is doing this action authorized or not.

Impact

This action is critical and sensitive. Attacker can upload this file to a url. Sends it to the victims. And when the authenticated victims navigate to the url their profile info will be modified.

Regards.

The original report as published on HackerOne, by ahmd_halabi. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the endpoint did not require a CSRF token or any other anti-CSRF mechanism to validate that the request originated from the application itself.

Impact

An attacker could modify a victim's company information by tricking an authenticated user into visiting a malicious page, which is a critical and sensitive action.

What the attacker needed

Victim is authenticated; victim visits attacker-controlled page

The fix

The endpoint should require a CSRF token, either in a header or a hidden form field, to verify the user's authorisation.

How it was found

  1. Edit company info and intercept the request.
  2. Generate a CSRF proof-of-concept from the intercepted request using Burp Suite.
  3. Open the generated page in a browser and have the victim visit the same link while authenticated.
  4. Click the button on the page and intercept the resulting request.
  5. Change the Content-Type header to application/json.
  6. Forward the request; the company info is changed.

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 report has not been written yet. The Original tab links to the source.

CSRF (Cross-Site Request Forgery) is when a malicious website makes a logged-in user's browser send a request to another site without the user's knowledge. Here, the company info editing page did not check for a secret token, so an attacker could craft a request that changes the victim's company details. The attacker just needs the victim to visit a link while logged in.

What is CSRF?

Another site makes a signed-in user's browser perform an action they did not intend.

More by ahmd_halabi

View all

12 more disclosed reports, best first.

More from U.S. Dept Of Defense

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site request forgery (CSRF)

The lesson behind this report.

Another site makes a signed-in user's browser perform an action they did not intend.