Skip to content
CSRF Disclosed report Beginner

CSRF On stealing lock in support.mozilla.org

The steal-lock endpoint in support.mozilla.org accepts GET requests without CSRF protection, so an attacker can force a logged-in victim to lock a wiki article by making them visit a crafted URL. This could prevent other users from editing the article.

roldanbrandon62 Follow

Originally disclosed on Mozilla

  • Fixed in 21 days
  • Paid in 27 days
  • Disclosed after 21 days
Text
Hi. The steal-lock function, allows get request making it vulnerable to csrf attacks since get requests in django doesnt need csrf protections. The endpoint is defined in `wiki/urls.py` in 
'''python
    re_path(r"^/steal_lock$", views.steal_lock, name="wiki.steal_lock"),
'''
This is the steal lock function
'''python
@login_required
def steal_lock(request, document_slug, revision_id=None):
    doc = get_object_or_404(Document, locale=request.LANGUAGE_CODE, slug=document_slug)
    user = request.user

    ok = _document_lock_steal(doc.id, user.username)
    return HttpResponse("", status=200 if ok else 400)
'''
So, when we trick a victim into following `https://support.allizom.org/en-US/kb/<article_slug>/steal_lock`, the document will be locked even if the victim is not actually editing the article.

The original report as published on Mozilla's Bugzilla, by roldanbrandon62. Images and videos are our own copies; raw HTML is shown as text. View it on Mozilla's Bugzilla.

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

The endpoint performs a state-changing action (stealing a document lock) via a GET request, which Django does not protect with CSRF tokens.

Impact

An attacker could cause a document to be locked by the victim, potentially denying other users the ability to edit it.

What the attacker needed

Victim is logged in; victim visits a crafted link

How it was found

  1. Identify the steal_lock endpoint that accepts GET requests.
  2. Craft a URL to the steal_lock endpoint for a target article.
  3. Trick a logged-in victim into visiting that URL.
  4. The document becomes locked by the victim's account.

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 site tricks your browser into sending a request to another site where you're logged in. Here, the lock action could be triggered just by loading a link, so an attacker could make you lock a page without you meaning to.

What is CSRF?

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

More by roldanbrandon62

View all

5 more disclosed reports, best first.

More from Mozilla

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.