Skip to content
CSRF Write-up Beginner

LedgerSMB – CVE-2024-23831: Privilege escalation through CSRF attack on “setup.pl”

The LedgerSMB setup.pl endpoint lacked anti-CSRF protections, allowing an attacker to craft a malicious page that, when visited by a logged-in administrator, automatically creates a new administrative account. This enables privilege escalation and unauthorised access to the application.

George Roumeliotis Follow

Published on twelvesec.com

by George Roumeliotis | Feb 2, 2024 |

George Roumeliotis, on twelvesec.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 attacker could create a new administrative account, leading to privilege escalation and full control over the LedgerSMB application.

What the attacker needed

Victim is logged in as admin; victim visits malicious page

The fix

The vulnerability was fixed in later versions; users should apply patches or updates provided by the maintainers.

How it was found

  1. Log in to the LedgerSMB instance as an administrator.
  2. Access the /setup.pl endpoint and inspect the 'Add User' feature.
  3. Generate a CSRF proof-of-concept HTML form that submits a request to create a new administrative user.
  4. Host the malicious HTML page on a server.
  5. Trick a logged-in administrator into visiting the malicious page.
  6. The victim's browser automatically submits the form, creating a new admin 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 write-up has not been written yet. The Original tab links to the source.

Cross-Site Request Forgery (CSRF) is an attack where a malicious website tricks a logged-in user's browser into sending a request to another site where the user is authenticated. Because the browser automatically includes the user's cookies, the target site cannot tell the request was forged. Here, an attacker could make an admin's browser create a new admin account without the admin's knowledge.

What is CSRF?

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

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.