Finding eight high-severity vulnerabilities in NodeBB in six hours
NodeBB before 4.14.0 contained several high-severity flaws, including XSS through federated profile icons, federation error logs and translation template injection, plus an admin authorization bypass via custom homepage rewriting and a user ID spoof to read private messages. An attacker could run JavaScript in a victim's or administrator's browser and reach admin-only data.
aikido.dev
Published on aikido.dev
While improving our AI Pentest, we ran a whitebox assessment on NodeBB, a forum software powered by NodeJS. The result?
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 user-controlled values were concatenated into HTML and templates without escaping, and permission checks ran before homepage rewriting changed the request path.
Impact
An attacker could execute JavaScript in a victim's browser, and in the admin log case take over the whole instance, while the homepage bypass exposed admin-only data and APIs.
What the attacker needed
Attacker-controlled federation server; victim opens a crafted link; a normal user account
The fix
It was fixed in version 4.14.0 by escaping federated data, escaping error fields, refactoring the translation system with sanitising, and re-ordering middleware so permission checks run after rewriting.
How it was found
- Set up a custom federation server that answers webfinger and actor requests
- Return a malicious icon URL in the actor document
- Get the victim to search for or open the federated user link
- The payload is rendered into the meta tag and JavaScript runs
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.
NodeBB is forum software. Several places took text from outside users and put it into web pages without making it safe, so a crafted link or profile could run code in someone's browser. Another flaw let a normal member see administrator pages by changing a personal setting.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.