Skip to content
XSS Write-up Intermediate

WordPress Plugin Limit Login Attempts Reloaded - Multiple Vulnerabilities

The WordPress plugin Limit Login Attempts Reloaded fails to validate the X-Forwarded-For header when configured to trust it, allowing an attacker to bypass login rate limiting by sending arbitrary values. Additionally, the plugin reflects the 'tab' parameter without sanitisation, enabling reflected XSS against administrators.

n4nj0.github.io

Published on n4nj0.github.io

This WordPress plugin is aimed to be a bruteforce attack protection mechanism, and is currently installed in more than 1 million of active installations. However, during a quick auditing of the plugin, I’ve found two issues.

Veno Eivazian, on n4nj0.github.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

Likely the plugin does not validate that the X-Forwarded-For header contains a valid IP address, and it fails to sanitise the 'tab' parameter before reflecting it.

Impact

An attacker could perform unlimited login attempts to brute-force credentials, and could execute arbitrary JavaScript in an administrator's browser to steal cookies or perform other actions.

What the attacker needed

Plugin installed and activated; Trusted IP Origins configured with a header; Administrator visits a crafted link

The fix

The vulnerabilities were fixed in version 2.17.4, but users were not notified.

How it was found

  1. Configure the plugin to trust the X-Forwarded-For header as a client IP origin.
  2. Send login requests with a different X-Forwarded-For value on each attempt.
  3. Observe that the login limit is never reached, allowing unlimited password guesses.
  4. As an administrator, visit the plugin settings page with a crafted 'tab' parameter containing a script.
  5. The script executes in the administrator's browser.

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 WordPress plugin is supposed to stop attackers from guessing passwords by limiting login attempts. However, if the site is set up to trust a header like X-Forwarded-For, an attacker can simply change that header on every attempt, so the plugin never blocks them. Separately, a crafted link can run malicious JavaScript in an administrator's browser when they visit a settings page.

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.