CVE-2024-23336
Executive Summary
CVE-2024-23336 is a Server-Side Request Forgery (SSRF) vulnerability in MyBB, a free and open-source forum software. The vulnerability arises because the default configuration only blocks the single IP address 127.0.0.1 from remote requests, but fails to block the entire 127.0.0.0/8 CIDR block. This oversight allows an attacker to potentially make the server send requests to internal IP addresses within the loopback range (e.g., 127.0.0.2, 127.0.0.3), bypassing the intended restriction. The CVSS score is 5.0 (Medium), and while no public exploit code is available, the attack vector is straightforward. The patch in MyBB 1.8.38 updates the default disallowed list to include the full 127.0.0.0/8 block.
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
MyBB is a PHP-based application distributed as a ZIP archive from its official website and GitHub. The vulnerability is in the default configuration file (inc/config.php), which is part of the core distribution. Administrators who install MyBB from the official source are affected if they do not manually update the configuration. There is no known compromise of the supply chain, but the risk is that many installations may remain unpatched due to the configuration not being automatically updated during upgrades.
CVSS Breakdown & Threat Level
- CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:L/I:N/A:N
- Base Score: 5.0 (Medium)
- Attack Vector: Network (AV:N) – The vulnerability can be exploited remotely.
- Attack Complexity: Low (AC:L) – No special conditions are required.
- Privileges Required: None (PR:N) – No authentication needed.
- User Interaction: None (UI:N) – No user action required.
- Scope: Changed (S:C) – The vulnerable component impacts resources beyond its security scope.
- Confidentiality Impact: Low (C:L) – Limited information disclosure (internal IPs/services).
- Integrity Impact: None (I:N) – No data modification.
- Availability Impact: None (A:N) – No denial of service.
Threat Level: Medium. While the impact is limited to information disclosure, SSRF can be chained with other vulnerabilities (e.g., accessing internal admin panels or cloud metadata endpoints) to escalate privileges.
Deep Dive & Mechanics
MyBB includes a feature to fetch remote resources (e.g., avatars, RSS feeds). To prevent abuse, it maintains a list of disallowed remote addresses in $config['disallowed_remote_addresses']. The default list in versions prior to 1.8.38 only contains 127.0.0.1. However, the loopback address range is 127.0.0.0/8, meaning any IP from 127.0.0.0 to 127.255.255.255 is a valid loopback address. By specifying an IP like 127.0.0.2, an attacker can bypass the restriction and force the server to make requests to internal services listening on that IP (e.g., a local database, cache, or cloud metadata endpoint like http://127.0.0.2/latest/meta-data/).
The vulnerability is in the configuration logic, not in the code itself. The code checks if the resolved IP of a remote host is in the disallowed list, but since the list only contains 127.0.0.1, other loopback IPs are allowed.
Vulnerable vs. Patched Code
Vulnerable Configuration (pre-1.8.38):
// inc/config.php
$config['disallowed_remote_addresses'] = array(
'127.0.0.1'
);
Patched Configuration (1.8.38+):
// inc/config.php
$config['disallowed_remote_addresses'] = array(
'127.0.0.1',
'127.0.0.0/8'
);
The patch adds the CIDR notation 127.0.0.0/8 to block the entire loopback range. The code that checks the disallowed list must support CIDR notation; MyBB 1.8.38 includes this support.
Exploitation & Lab Setup
Red Team (Exploitation)
Prerequisites:
- A MyBB instance (version < 1.8.38) with the default configuration.
- A feature that fetches remote resources (e.g., avatar URL, RSS feed import).
Exploitation Steps:
- Identify a feature that makes HTTP requests to user-supplied URLs (e.g., profile avatar URL).
- Provide a URL that resolves to a loopback IP other than
127.0.0.1, such ashttp://127.0.0.2:8080/adminorhttp://127.0.0.3/latest/meta-data/. - The server will make a request to that internal IP, potentially disclosing sensitive information.
Example Payload:
POST /member.php?action=profile HTTP/1.1
Host: target.mybb.com
Content-Type: application/x-www-form-urlencoded
avatar_url=http://127.0.0.2:3306
Note: No public exploit code is available, but the attack is trivial to execute.
Blue Team (Detection & Defense)
Detection:
- Monitor outbound HTTP requests from the MyBB server to loopback IPs (127.0.0.0/8) that are not
127.0.0.1. - Look for requests to internal IPs (e.g., 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) originating from the web server.
Defense:
- Immediately update
inc/config.phpto include127.0.0.0/8and any other internal IP ranges. - Apply the MyBB 1.8.38 patch or manually edit the configuration.
- Use a Web Application Firewall (WAF) to block requests containing loopback IPs in URL parameters.
- Restrict outbound traffic from the web server using firewall rules (e.g., deny all outbound except to specific external services).
Indicators of Compromise (IOCs)
- Network IOCs:
- Outbound HTTP requests from the MyBB server to IPs in the
127.0.0.0/8range (excluding127.0.0.1). - Requests to internal IP ranges (e.g.,
10.x.x.x,172.16-31.x.x,192.168.x.x) from the web server.
- Outbound HTTP requests from the MyBB server to IPs in the
- File IOCs:
- Configuration file
inc/config.phpcontaining only'127.0.0.1'in thedisallowed_remote_addressesarray.
- Configuration file
- Log IOCs:
- Web server access logs showing requests to URLs with loopback IPs (e.g.,
http://127.0.0.2/).
- Web server access logs showing requests to URLs with loopback IPs (e.g.,
Detection Engineering
YARA Rule
rule CVE_2024_23336_MyBB_SSRF_Config
{
meta:
description = "Detects vulnerable MyBB configuration missing 127.0.0.0/8 block"
author = "Valters IT"
date = "2025-04-10"
cve = "CVE-2024-23336"
strings:
$config_start = "$config['disallowed_remote_addresses']"
$vuln_entry = "'127.0.0.1'"
$patched_entry = "'127.0.0.0/8'"
condition:
$config_start and $vuln_entry and not $patched_entry
}
Sigma Rule
title: MyBB SSRF via Incomplete Loopback Blocking
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects outbound HTTP requests from MyBB to loopback IPs other than 127.0.0.1
author: Valters IT
date: 2025-04-10
logsource:
category: network_connection
product: suricata
detection:
selection:
dest_ip:
- '127.0.0.0/8'
dest_port: 80
dest_port: 443
filter:
dest_ip: '127.0.0.1'
condition: selection and not filter
falsepositives:
- Legitimate internal monitoring tools
level: high
Suricata Rule
alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-23336 MyBB SSRF Attempt to Loopback IP"; flow:to_server; content:"127."; http_uri; pcre:"/^http:\/\/(127\.(?!0\.0\.1)[0-9]+\.)/"; classtype:attempted-recon; sid:1000001; rev:1;)
Remediation & Mitigation
Immediate Actions:
- Update MyBB: Upgrade to version 1.8.38 or later.
- Manual Configuration Fix: If upgrading is not possible, edit
inc/config.phpand add'127.0.0.0/8'to the$config['disallowed_remote_addresses']array. - Network Segmentation: Ensure the MyBB server cannot access sensitive internal resources (e.g., cloud metadata endpoints, internal databases) via firewall rules.
Long-Term Mitigations:
- Regularly review and update the disallowed remote addresses list to include all internal IP ranges.
- Implement a Web Application Firewall (WAF) with rules to block SSRF attempts.
- Monitor outbound traffic from the web server for anomalies.
Valters IT Signature:
This report was generated by Valters IT – DevSecOps & Cyber Threat Intelligence Division.