Skip to main content
Vulnerability Database/CVE-2024-22208

CVE-2024-22208: phpMyFAQ Email Abuse Vulnerability

CVE-2024-22208 is an email abuse flaw in phpMyFAQ allowing unauthenticated attackers to send mass emails through the sharing FAQ feature. This vulnerability can lead to server blacklisting and reputation damage. This article covers technical details, affected versions, impact assessment, and mitigation strategies.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-22208 Overview

CVE-2024-22208 affects phpMyFAQ, an open source FAQ web application for PHP 8.1+ with MySQL, PostgreSQL, and other database backends. The vulnerability resides in the sharing FAQ functionality, which allows unauthenticated users to share FAQ articles with up to five recipients via email. The front-end enforces this five-recipient limit, but the backend does not validate the array size. An attacker can solve a single CAPTCHA and submit thousands of recipient addresses in one request. This enables mass phishing campaigns, abuse of the server's email reputation, and potential blacklisting of the mail server. The flaw is tracked under CWE-863: Incorrect Authorization.

Critical Impact

Unauthenticated attackers can abuse the share-to-friend endpoint to send arbitrary emails to large recipient lists, enabling phishing distribution and mail server reputation damage.

Affected Products

  • phpMyFAQ versions prior to 3.2.5
  • Deployments running on PHP 8.1+ with MySQL or PostgreSQL
  • All phpMyFAQ instances exposing the public share-FAQ feature

Discovery Timeline

  • 2024-02-05 - CVE-2024-22208 published to the National Vulnerability Database
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-22208

Vulnerability Analysis

The vulnerability is a business logic flaw in the send2friend share endpoint handled by phpmyfaq/api.service.php. The front-end template exposes five input fields for recipient email addresses and gates submission with a CAPTCHA. The backend accepts the mailto[] array parameter and iterates over every entry to dispatch an outbound email. No server-side count validation existed before version 3.2.5, so a crafted POST request containing an arbitrarily large mailto[] array triggered one email per entry.

An attacker only needs to solve one CAPTCHA, then submit a single HTTP request that embeds thousands of recipients. The server dispatches each message using the configured mail transport, with content partially controlled through the message, name, and previously link parameters. Because the pre-patch code also honored a user-supplied link field via FILTER_VALIDATE_URL, the attacker could point recipients to an arbitrary external URL that appeared to originate from the trusted phpMyFAQ host.

Root Cause

The root cause is missing authorization and input validation on the mailto[] array parameter in the share handler. The application trusted that the HTML form constrained the recipient count to five, but no equivalent check existed in api.service.php. The share link URL was also constructed from user input instead of being derived server-side from faqId, categoryId, and lang.

Attack Vector

Exploitation requires only network access to the phpMyFAQ web interface. The attacker solves the CAPTCHA once, captures the POST request, and modifies the mailto[] array to include an arbitrary number of recipients. The server processes the request and delivers phishing content, often bypassing recipient spam filters because the mail originates from a legitimate domain.

php
// Patch excerpt from phpmyfaq/api.service.php
$author = trim((string) Filter::filterVar($postData['name'], FILTER_SANITIZE_SPECIAL_CHARS));
$email = Filter::filterVar($postData['email'], FILTER_VALIDATE_EMAIL);
// Removed: user-controlled link parameter
$attached = trim((string) Filter::filterVar($postData['message'], FILTER_SANITIZE_SPECIAL_CHARS));
$mailto = Filter::filterArray($postData['mailto[]']);

$faqLanguage = trim((string) Filter::filterVar($postData['lang'], FILTER_SANITIZE_SPECIAL_CHARS));
$faqId = trim((string) Filter::filterVar($postData['faqId'], FILTER_VALIDATE_INT));
$categoryId = trim((string) Filter::filterVar($postData['categoryId'], FILTER_VALIDATE_INT));

// Added: enforce the 5-recipient limit server-side
if (is_array($mailto) && count($mailto) > 5) {
    $response->setStatusCode(Response::HTTP_BAD_REQUEST);
    $response->setData(['error' => Translation::get('err_sendMail')]);
    break;
}

// Added: construct share link server-side instead of trusting user input
$send2friendLink = sprintf(
    '%sindex.php?action=faq&cat=%d&id=%d&artlang=%s',
    $faqConfig->getDefaultUrl(),
    $categoryId,
    $faqId,
    urlencode($faqLanguage)
);

Source: GitHub commit a34d94a

Detection Methods for CVE-2024-22208

Indicators of Compromise

  • Unusual outbound SMTP volume from the phpMyFAQ host that correlates with POST requests to the send2friend or share endpoint
  • HTTP POST requests to the share handler containing mailto[] arrays with more than five entries
  • Mail server deliverability warnings, SPF or DKIM failures, and inclusion of the server IP on public blocklists such as Spamhaus
  • Recipient domains unrelated to the organization's typical user base appearing in mail transfer logs

Detection Strategies

  • Parse web server access logs for POST requests to index.php?action=savefaq2friend or api.service.php share actions and flag payloads with large mailto[] arrays
  • Correlate single-source HTTP requests with bursts of SMTP sessions on the mail relay to identify abuse patterns
  • Monitor the phpMyFAQ installed version via the admin interface or /admin/configuration.php to identify instances below 3.2.5

Monitoring Recommendations

  • Alert when outbound mail volume from the phpMyFAQ host exceeds a baseline threshold within a short time window
  • Track CAPTCHA success-to-email-sent ratios; a single CAPTCHA event followed by hundreds of outbound messages indicates exploitation
  • Review mail server reputation daily using feedback loops from major providers to catch blacklisting early

How to Mitigate CVE-2024-22208

Immediate Actions Required

  • Upgrade phpMyFAQ to version 3.2.5 or later, which enforces the five-recipient limit server-side and removes the user-controlled share link parameter
  • If an immediate upgrade is not possible, disable the share-to-friend feature in the phpMyFAQ administration panel
  • Review mail server logs for prior abuse and rotate any mail reputation controls such as SPF, DKIM, and DMARC entries that may have been impacted

Patch Information

The fix is published in phpMyFAQ 3.2.5 via commit a34d94a. The patch adds a server-side count($mailto) > 5 check in phpmyfaq/api.service.php and rebuilds the share URL from the server-side faqId, categoryId, and lang values instead of trusting the client-supplied link field. See the GitHub Security Advisory GHSA-9hhf-xmcw-r3xg for full remediation details.

Workarounds

  • Place the phpMyFAQ instance behind a web application firewall and block POST bodies where the mailto[] parameter contains more than five entries
  • Apply mail relay rate limiting per source application to cap outbound messages from the phpMyFAQ host
  • Restrict access to the share endpoint through authentication middleware or IP allowlisting until the patch is applied
bash
# Example ModSecurity rule to block oversized mailto[] arrays
SecRule REQUEST_METHOD "@streq POST" \
  "id:1002208,phase:2,chain,deny,status:400,\
  msg:'CVE-2024-22208 phpMyFAQ share abuse attempt'"
  SecRule ARGS_NAMES "@rx ^mailto\[\]$" \
    "chain"
    SecRule &ARGS:'mailto[]' "@gt 5"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.