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.
Published on twelvesec.com
by George Roumeliotis | Feb 2, 2024 |
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
- Log in to the LedgerSMB instance as an administrator.
- Access the /setup.pl endpoint and inspect the 'Add User' feature.
- Generate a CSRF proof-of-concept HTML form that submits a request to create a new administrative user.
- Host the malicious HTML page on a server.
- Trick a logged-in administrator into visiting the malicious page.
- 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.