☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.4 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2024-2122

CVE-2024-2122 Cross-Site Scripting in Foogallery
📅 PUBLISHED: 2024-06-14 05:39 UTC 🔄 UPDATED: 2026-08-12 14:53 UTC
[ PATCH UNDER REVIEW ↓ ] Remains UNDER REVIEW until an independent source confirms the fix
[ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 5.10%
👁️
5.10% probability
127.4× above the median CVE
Tier: HIGH
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1190
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.4
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: L Privileges Required Low
UI: N User Interaction None
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: N Availability None
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-2122 is a Stored Cross-Site Scripting (XSS) vulnerability in the FooGallery WordPress plugin, affecting all versions up to and including 2.4.15. The flaw resides in the handling of album gallery custom URLs, where insufficient input sanitization and output escaping allow authenticated attackers with contributor-level access or higher to inject arbitrary web scripts. When a user accesses a page containing the maliciously crafted gallery, the injected script executes in the context of the victim's browser. This can lead to session hijacking, credential theft, or defacement. The vulnerability has a CVSS score of 6.4 (Medium) and an EPSS score of 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept or patch is currently available.

⚡ AUTOMATE YOUR CVE INTELLIGENCE

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.

›Patch confidence — UNVERIFIED to CONFIRMED, cross-referenced NVD + RHSA + Debian
›Exploit & PoC — poc_status, poc_url, has_exploit. Not in NVD.
›Shodan dorks — ready-made queries to find exposed vulnerable systems
›Detection rules — YARA · Wazuh · Elastic (all plans) · Sigma (Pro)
›pending_fields — know exactly which of 7 fields NVD hasn't processed yet
›Free backfill — data incomplete when you paid? Re-check within 30 days = 0 credits
PAYG €0.08/lookup Standard €19/mo (was €29) · 5k credits Pro €65/mo (was €99) · 20k credits FOUNDING PRICE · LOCKED FOR LIFE · ENDS 31 DEC 2026
[ FROM €19/MO ]
Free sandbox key available
No signup required

WordPress Ecosystem Context

This vulnerability is specific to the FooGallery WordPress plugin. It is not related to the underlying web server (Apache or Nginx) but rather to the plugin's failure to properly sanitize user-supplied input before storing and rendering it. As a WordPress plugin, it operates within the WordPress ecosystem, and exploitation requires valid user credentials with at least contributor-level permissions.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.4 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:L/A:N
  • Attack Vector (AV): Network – The vulnerability is exploitable remotely.
  • Attack Complexity (AC): Low – No special conditions are required.
  • Privileges Required (PR): Low – Attacker needs contributor-level access or higher.
  • User Interaction (UI): None – The victim does not need to perform any action beyond viewing the page.
  • Scope (S): Changed – The injected script can affect resources beyond the vulnerable component.
  • Confidentiality (C): Low – Limited information disclosure possible.
  • Integrity (I): Low – Limited ability to modify content.
  • Availability (A): None – No impact on availability.

Threat Level: Medium. While the CVSS score is moderate, the requirement for authenticated access reduces the attack surface. However, once exploited, the stored XSS can persist and affect all users visiting the compromised page.

Deep Dive & Mechanics

The vulnerability exists in the FooGallery plugin's album gallery feature. When a user with contributor-level or higher privileges creates or edits an album gallery, they can specify a custom URL for the gallery. The plugin fails to properly sanitize this input before storing it in the database and later rendering it on the frontend. Specifically, the esc_url() or similar escaping functions are not applied, allowing an attacker to inject JavaScript code into the URL field.

Attack Flow:

  1. An authenticated attacker with contributor-level access navigates to the FooGallery album editor.
  2. In the custom URL field, the attacker inputs a malicious payload, e.g., javascript:alert(document.cookie) or a more complex XSS vector like " onmouseover="alert(1).
  3. The plugin stores this unsanitized input in the WordPress database.
  4. When any user (including administrators or visitors) views a page that renders this album gallery, the malicious script executes in their browser.
  5. The attacker can then steal session cookies, redirect users to phishing sites, or perform other malicious actions.

Root Cause: The plugin uses esc_attr() or similar functions inconsistently, or fails to use esc_url() on the custom URL field before output. The stored data is not validated to ensure it is a safe URL.

Vulnerable vs. Patched Code

Since no official patch is available, the following is a hypothetical comparison based on common remediation patterns.

Vulnerable Code (FooGallery <= 2.4.15):

// In a template file or shortcode handler
$custom_url = get_post_meta($post_id, 'foogallery_album_custom_url', true);
echo '<a href="' . $custom_url . '">View Album</a>';

The $custom_url is output directly without escaping, allowing XSS.

Patched Code (Hypothetical Fix):

$custom_url = get_post_meta($post_id, 'foogallery_album_custom_url', true);
echo '<a href="' . esc_url($custom_url) . '">View Album</a>';

Using esc_url() ensures the URL is safe and strips dangerous protocols like javascript:.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • A WordPress instance with FooGallery plugin version <= 2.4.15.
  • An account with contributor-level privileges or higher.

Steps:

  1. Log in as a contributor.
  2. Create a new album gallery or edit an existing one.
  3. In the custom URL field, enter the following payload:
    javascript:alert('XSS')
    
    Or a more sophisticated payload:
    " onmouseover="alert(document.cookie)
    
  4. Save the album gallery.
  5. As an administrator or visitor, navigate to the page displaying the album gallery. The script will execute.

Note: No public exploit code is available. The above is a conceptual demonstration.

Blue Team (Detection & Hardening)

Detection:

  • Monitor for unusual custom URL values in the foogallery_album_custom_url post meta.
  • Look for patterns like javascript:, onmouseover=, or <script> in database entries.
  • Use Web Application Firewall (WAF) rules to block XSS payloads in POST requests to album gallery endpoints.

Hardening:

  • Restrict contributor-level access to trusted users only.
  • Implement Content Security Policy (CSP) headers to mitigate XSS impact.
  • Apply input validation and output escaping on all user-supplied fields.

Indicators of Compromise (IOCs)

  • Database Entries: Post meta with key foogallery_album_custom_url containing suspicious strings like javascript:, <script>, or event handlers.
  • HTTP Requests: POST requests to /wp-admin/admin-ajax.php or album editor endpoints with XSS payloads in the custom URL parameter.
  • Logs: Access logs showing requests to pages with injected albums, followed by unusual outbound connections (e.g., to attacker-controlled domains).
  • File System: No specific file changes expected, as the payload is stored in the database.

Detection Engineering

YARA Rule

rule CVE_2024_2122_FooGallery_XSS {
    meta:
        description = "Detects stored XSS payloads in FooGallery album custom URLs"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-2122"
    strings:
        $xss1 = /foogallery_album_custom_url.*(javascript|on\w+=|<script)/i
        $xss2 = /custom_url.*(alert|prompt|confirm|eval|fromCharCode)/i
    condition:
        any of them
}

Sigma Rule

title: FooGallery Stored XSS via Album Custom URL
id: 12345678-1234-1234-1234-123456789abc
status: experimental
description: Detects stored XSS attempts in FooGallery album custom URL field
author: Valters IT
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.method: 'POST'
        http.url: '/wp-admin/admin-ajax.php'
        http.body: 'action=foogallery_save_album'
        http.body: 'custom_url'
    filter:
        http.body: 'custom_url='
    condition: selection and not filter
falsepositives:
    - Legitimate use of custom URLs
level: medium

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2024-2122 FooGallery Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"/wp-admin/admin-ajax.php"; http_uri; content:"action=foogallery_save_album"; http_client_body; content:"custom_url"; http_client_body; pcre:"/custom_url=[^&]*(javascript|on\w+=|<script)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Upgrade: If a patched version becomes available, upgrade FooGallery immediately. Currently, no patch exists.
  2. Disable Plugin: Temporarily disable the FooGallery plugin if not critical.
  3. Restrict Access: Limit contributor-level accounts to trusted users only.
  4. WAF Rules: Deploy WAF rules to block XSS payloads in album custom URL fields.

Long-Term Measures:

  • Input Validation: Implement server-side validation to ensure custom URLs are safe (e.g., only allow http:// and https:// schemes).
  • Output Escaping: Use esc_url() and esc_attr() consistently when rendering user-supplied data.
  • Security Audits: Regularly audit plugins for similar vulnerabilities.
  • CSP Headers: Implement Content Security Policy to mitigate XSS impact.

Valters IT Signature This report was generated by Valters IT DevSecOps AI. For further analysis, contact security@valters-it.com.

👁️ SHODAN DORKS (THREAT HUNTING)

What is this? Security researchers use these exact search queries on Shodan.io (a search engine for internet-connected devices) to find vulnerable systems globally. You can copy these dorks to see if your organization's IP space is exposed.

http.title:"FooGallery"
http.html:"wp-content/plugins/foogallery"

💣 PoC CODE AVAILABLE

Exploit code for this CVE is tracked in our database. Access poc_code via API Pro.

[ API_PRO ] →
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2024-2122/ · CVE data: NVD/MITRE (public domain) · © 2026 ValtersIT Hub
>_ SYSTEM_CORE: INTEL_ACTIVE
90% TEAM-CURATED // 10% AUTOMATED INGESTION.
ALL PATCH REFERENCES AND VERSION DATA SOURCED FROM NVD + OSV OFFICIAL REGISTRIES.