CVE Professor
/
All CVEs
CVE-2026-138395

CVE-2026-138395 — Black-coffe Easy-php-cms — CWE-89 · CWE-74

MEDIUM CVSS 7.3 ⚡ EPSS 0.5% CVE.org

A security flaw has been discovered in Black-coffe easy-php-cms 4ca1f761d05fd819b202daf1355ff46881a8f93a/acbb257b2afbf148c8e193d26f277183773572b5. Impacted is the function selectPostFromPostsWithUsersOnSingle of the file single.php. Performing a manipulation of the argument post results in sql injection. The attack is possible to be carried out remotely. The exploit has been released to the public and may be used for attacks. This product adopts a rolling release strategy to maintain continuous delivery. Therefore, version details for affected or updated releases cannot be specified. The project was informed of the problem early through an issue report but has not responded yet.

A security flaw has been discovered in Black-coffe easy-php-cms 4ca1f761d05fd819b202daf1355ff46881a8f93a/acbb257b2afbf148c8e193d26f277183773572b5. Impacted is the function selectPostFromPostsWithUsersOnSingle of the file single.php. Performing a manipulation of the argument post results in sql injection. The attack is possible to be carried out remotely. The exploit has been released to the public and may be used for attacks. This product adopts a rolling release strategy to maintain continuous delivery. Therefore, version details for affected or updated releases cannot be specified. The project was informed of the problem early through an issue report but has not responded yet.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:P
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. Low VC:L
Vuln. Integrity Low VI:L
Vuln. Avail. Low VA:L
Subseq. Conf. None SC:N
Subseq. Integ. None SI:N
Subseq. Avail. None SA:N
EPSS — Exploit Prediction Scoring System
0.5%
30-day probability
In the 33. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a SQL Injection (SQLi) flaw classified under CWE-89 (SQL Injection) and CWE-74 (Improper Neutralization of Special Elements in Output Used by a Downstream Component).

Technical Flaw Analysis:
The vulnerability resides in the single.php file of the easy-php-cms application, specifically within the function selectPostFromPostsWithUsersOnSingle. The root cause is the failure to sanitize or parameterize the post argument before it is interpolated into a SQL query.

1. Missing Input Validation: The application accepts user-supplied input via the post parameter (likely a GET or POST parameter) and passes it directly to the database layer without using prepared statements or proper escaping.
2. Unauthenticated Access: The CVSS vector (PR:N) indicates that no authentication is required. This implies that the single.php endpoint is publicly accessible, allowing any remote attacker to manipulate the post parameter.
3. Injection Point: The post argument is likely used to fetch a specific blog post or article. By injecting SQL syntax (e.g., ' OR 1=1 --), an attacker can alter the logic of the query, potentially bypassing intended filters, extracting data, or modifying database contents.

CVSS Vector Breakdown:

  • AV:N (Network): Exploitable remotely over the network.

  • AC:L (Low Complexity): No special conditions required; standard HTTP request suffices.

  • PR:N (None): No privileges required.

  • UI:N (None): No user interaction required.

  • S:U (Unchanged): Scope remains within the vulnerable component.

  • C:L/I:L/A:L (Low Impact): The CVSS score of 7.3 suggests limited impact. This is unusual for SQLi, which often allows full data exfiltration (C:H) or RCE (A:H). The "Low" impact rating may indicate that the specific injection point only allows for limited data retrieval (e.g., reading specific columns) or that the database user has restricted permissions. However, in practice, SQLi often leads to higher impact if the DB user has broader privileges.
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: An attacker scans for the easy-php-cms application. Since the project uses a rolling release strategy, version detection is difficult. However, the presence of single.php and specific error messages or HTML structure can confirm the CMS.
  • Endpoint Identification: The attacker identifies the single.php endpoint, which is typically used to display individual blog posts (e.g., /single.php?post=1).
  • 2. Exploitation

    The attacker crafts a malicious HTTP request to the single.php endpoint, injecting SQL code into the post parameter.

    Illustrative PoC (SQL Injection):
    Note: The exact parameter name and endpoint path are derived from the CVE description. The payload below is a standard SQLi example.

    # Basic Union-Based SQLi to extract database version
    curl -X GET "http://target.com/single.php?post=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10-- -"
    
    # Blind SQLi to check for true/false conditions
    curl -X GET "http://target.com/single.php?post=1' AND 1=1-- -"
    curl -X GET "http://target.com/single.php?post=1' AND 1=2-- -"

    Detailed Exploitation Mechanics:
    1. Error-Based/Union-Based: If the application displays database errors or allows UNION SELECT, the attacker can extract data from other tables (e.g., users, admin_credentials).
    2. Blind SQLi: If no data is returned, the attacker uses time-based or boolean-based blind SQLi to infer data character by character.
    3. Stacked Queries: If the database driver supports stacked queries (e.g., MySQL with ALLOW_MULTI_QUERIES), the attacker might execute multiple statements, potentially leading to file writes or RCE (though CVSS rates impact as Low, this is a risk).

    3. Post-Exploitation

  • Data Exfiltration: Extract sensitive data such as user credentials, session tokens, or private content.
  • Privilege Escalation: If admin credentials are extracted, the attacker can log in to the CMS admin panel to modify content, upload webshells, or change configurations.
  • Persistence: If the attacker gains admin access, they can install malicious plugins or modify core files to maintain access.
  • 🌍 Real World Impact

  • Confidentiality (Low): The CVSS score indicates limited confidentiality impact. This could mean:
  • * The database user has restricted permissions (e.g., SELECT only on specific tables). * The injection point only allows reading limited data (e.g., post titles, not user passwords). * However, in real-world scenarios, SQLi often leads to full database compromise if the DB user has broader privileges.
  • Integrity (Low): The attacker may be able to modify limited data (e.g., changing post content) but not critical system files or configurations.
  • Availability (Low): The attacker might be able to cause a denial of service by injecting heavy queries (e.g., SLEEP(10)), but this is likely limited in scope.
  • Practical Consequences:

  • Data Breach: Exposure of user data, private posts, or internal communications.

  • Defacement: Modification of public content.

  • Compromised Admin Accounts: If credentials are exposed, full control of the CMS is possible.
  • 🛡️ Remediation & Mitigation

    1. Patching

  • Upgrade: Since the project uses a rolling release strategy, there is no specific version number. Users must update to the latest commit from the repository.
  • Manual Patch: If updating is not immediately possible, manually patch the selectPostFromPostsWithUsersOnSingle function in single.php to use prepared statements.
  • Example of Secure Code (PHP with PDO):

    // VULNERABLE (Illustrative)
    // $query = "SELECT * FROM posts WHERE id = " . $_GET['post'];
    
    // SECURE (Using PDO Prepared Statements)
    $stmt = $pdo->prepare("SELECT * FROM posts WHERE id = :post_id");
    $stmt->execute([':post_id' => $_GET['post']]);
    $posts = $stmt->fetchAll();

    2. Workarounds

  • Input Validation: Strictly validate the post parameter to ensure it contains only integers (if it represents an ID).
  • if (!ctype_digit($_GET['post'])) {
            die("Invalid post ID");
        }
  • WAF Rules: Deploy a Web Application Firewall (WAF) to block SQLi patterns.
  • * ModSecurity Rule Example:
    SecRule ARGS:post "@rx (?i)(union|select|insert|update|delete|drop|alter|create|exec|xp_cmdshell|sleep|benchmark)" \
                "id:100001,phase:2,deny,status:403,msg:'SQL Injection Detected in post parameter'"
  • Access Restriction: If single.php is not required to be publicly accessible, restrict access via IP whitelisting or authentication.
  • 3. Detection

  • Web Server Logs: Monitor for unusual patterns in the post parameter.
  • * IoC Example:
    GET /single.php?post=1' UNION SELECT 1,2,3,4,5,6,7,8,9,10-- - HTTP/1.1

    * Log Pattern:

    post=[^&]*('|\(|\)|%27|%28|%29|UNION|SELECT|SLEEP)
  • Database Logs: Enable general query logs in the database to detect anomalous queries.
  • File Integrity Monitoring: Monitor for unexpected changes to single.php or other core files.
  • ⚠️ Urgency

  • CVSS Score: 7.3 (HIGH)
  • CISA KEV: No
  • Exploit Availability: Publicly released.
  • Patch Status: Project has not responded to the issue report.
Patching Priority: HIGH

Rationale:
1. Public Exploit: The exploit is publicly available, increasing the likelihood of automated scanning and exploitation.
2. Unauthenticated: No login required, making it easy for attackers to exploit.
3. No Vendor Response: The project has not responded, meaning no official patch is available. Users must self-patch or apply workarounds.
4. Rolling Release: The lack of versioning makes it difficult to determine if a specific installation is vulnerable, increasing the risk.

Recommended Actions:
1. Immediate: Apply input validation and prepared statements to single.php.
2. Short-Term: Deploy WAF rules to block SQLi attempts.
3. Long-Term: Monitor the project repository for a fix and update as soon as it is available. Consider migrating to a more actively maintained CMS if the project remains unresponsive.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

header="X-Powered-By" && header="PHP"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138395
Technical reference / advisory repository for CVE-2026-138395
CVSS Score
7.3 / 10 · CVSS MEDIUM
Weakness Types (CWE)
CWE-89 CWE-74
Affected Products (1)
Black-coffe:easy-php-cms (commit: 4ca1f761d0)
Related CVEs
7.4
CVE-2026-126604
sanitize-filename (PyPI) < 1.2.1 is vulnerable to path traversal attacks. sanitize() removed blacklisted chara
6.9
CVE-2026-132097
Server-side request forgery in the outbound address guard (IPUtils, CircuitBreakerUrl) used by downloads by UR
6.3
CVE-2026-145185
Internxt drive-server-wip before commit 6a7801c contains an insufficient session expiration vulnerability in A
6.1
CVE-2026-144582
validator.js through 13.15.35 contains a host validation bypass vulnerability in isURL() that allows attackers
9.9
CVE-2026-45262
FacturaScripts is an open source accounting and invoicing software. Prior to version 2026.2, Core/Where.php::s
9.8
CVE-2026-145040
WWBN AVideo before 29.9.0 contains a blind sql injection vulnerability that allows unauthenticated attackers t
9.3
CVE-2026-136358
Joomla Extension - joomboost.com - Unauthenticated SQL injection in JoomMedia extension 1.0.0-6.1.5 - The list