☠️
EXFILTRATING
DATA...
01010111 10110010 00101001 11000110 01101100 10011011 00010001 11100101 01000010 10101111
[ <-- BACK_TO_SEARCH ]
[ VENDOR STATS ]
SOON 🐛 CWE-276
👁️
Common Weakness Enumeration - Identifies the specific category of software weakness or flaw.

CVE-2023-39593

CVE-2023-39593 Supply Chain Attack in Mariadb
📅 PUBLISHED: 2024-10-17 00:00 UTC 🔄 UPDATED: 2026-08-12 09:03 UTC
⏳ SCORE PENDING — ANALYSIS IN PROGRESS [ DEFENSE PATCH ↓ ]
💣 PoC: None
👁️
Proof of Concept - Indicates if functional exploit code is publicly available, drastically increasing the risk of immediate attacks.
🎯 EPSS: 0.79%
👁️
0.79% probability
19.8× above the median CVE
Tier: ELEVATED
30-day exploitation window · FIRST.org · updated daily
🥷 MITRE: T1204
👁️
MITRE ATT&CK Tactic - Describes the strategy hackers use to execute this attack.
VULNERABLE: UNKNOWN / CHECK VENDOR
CVSS SEVERITY SCALE
9.0–10.0 CRITICAL
7.0–8.9 HIGH
4.0–6.9 MEDIUM
0.1–3.9 LOW
0.0 NONE
SOON
PENDING NVD
■ tracking this CVE ✓ independent patch confirmation ⧗ same-origin mirror (GHSA) ⚠ active exploitation verification policy →

Executive Summary

CVE-2023-39593 describes a disputed vulnerability in MariaDB v10.5 involving insecure permissions in the sys_exec function. The claim is that authenticated attackers can execute arbitrary commands with elevated privileges. However, the MariaDB Foundation disputes this, stating that no privilege boundary is crossed because sys_exec is designed to run with the privileges of the MariaDB process itself, not with additional elevation. The CVSS score is 0.0, indicating no consensus on severity. No public exploit code or proof-of-concept is available. The vulnerability is not related to a WordPress plugin or component.

⚡ 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 affects the MariaDB database server, which is a community-developed fork of MySQL. It is distributed as a standalone package and is not typically part of a supply chain package manager like NPM, PyPI, Go, or Ruby. However, organizations using MariaDB as a backend database should assess their exposure, particularly if they allow authenticated users to call sys_exec.

CVSS Breakdown & Threat Level

  • CVSS Score: 0.0 (Disputed)
  • Attack Vector: Local (authenticated)
  • Attack Complexity: Low
  • Privileges Required: Low (authenticated user)
  • User Interaction: None
  • Scope: Unchanged
  • Confidentiality Impact: High (if exploitable)
  • Integrity Impact: High (if exploitable)
  • Availability Impact: High (if exploitable)

Threat Level: Low (due to dispute and lack of evidence)

Deep Dive & Mechanics

The sys_exec function in MariaDB is a user-defined function (UDF) that allows execution of system commands from within SQL queries. It is not enabled by default and requires explicit installation. The vulnerability claim suggests that the permissions on the sys_exec function are insecure, allowing any authenticated user to call it and execute arbitrary commands with the privileges of the MariaDB process (typically mysql user).

The MariaDB Foundation disputes this, arguing that sys_exec is intentionally designed to run with the privileges of the MariaDB process, and that no privilege escalation occurs because the function does not cross any security boundary. In other words, if a user already has the ability to call sys_exec, they are already operating within the security context of the database server.

The core issue is a misunderstanding of the intended behavior. The function is not meant to be a security boundary; it is a convenience feature for administrators. If an attacker has authenticated access to the database and the function is enabled, they can execute commands as the mysql user, which may have access to sensitive files or other resources.

Vulnerable vs. Patched Code

Vulnerable Code (MariaDB v10.5 with sys_exec enabled):

-- The sys_exec function is installed and accessible to any authenticated user
SELECT sys_exec('id');

Patched Code: No official patch has been released. The MariaDB Foundation recommends that administrators:

  • Do not enable sys_exec unless absolutely necessary.
  • Restrict access to sys_exec using database privileges (e.g., GRANT EXECUTE ON FUNCTION sys_exec TO 'specific_user'@'localhost').
  • Ensure the MariaDB process runs with the least privileges necessary.

Exploitation & Lab Setup

Red Team

Prerequisites:

  • MariaDB v10.5 with sys_exec enabled.
  • Authenticated database user account.

Exploitation Steps:

  1. Connect to the MariaDB server using a valid user account.
  2. Execute the following SQL query to run a system command:
    SELECT sys_exec('whoami');
    
  3. To execute more complex commands, use shell scripting:
    SELECT sys_exec('bash -c "echo vulnerable > /tmp/pwned"');
    

Note: No public exploit code is available. The above is a demonstration of the intended functionality.

Blue Team

Detection and Prevention:

  • Monitor for usage of sys_exec in database logs.
  • Restrict access to sys_exec using database privileges.
  • Disable sys_exec if not required.
  • Run the MariaDB process with a low-privilege user account.
  • Use database activity monitoring (DAM) tools to alert on suspicious queries.

Indicators of Compromise (IOCs)

  • Log Entries: Queries containing sys_exec in MariaDB general query log or audit log.
  • Process List: Unusual processes spawned by the MariaDB process (e.g., bash, sh, curl, wget).
  • File System: Unexpected files created in /tmp or other writable directories by the mysql user.
  • Network Connections: Outbound connections from the MariaDB server to external IPs (if command execution is used for exfiltration).

Detection Engineering

YARA Rule

rule detect_mariadb_sys_exec_usage {
    meta:
        description = "Detects usage of sys_exec function in MariaDB queries"
        author = "Valters IT"
        date = "2024-01-01"
        reference = "CVE-2023-39593"
    strings:
        $sys_exec = "sys_exec" nocase
    condition:
        $sys_exec
}

Sigma Rule

title: MariaDB sys_exec Function Usage
id: 12345678-1234-1234-1234-123456789012
status: experimental
description: Detects queries containing the sys_exec function in MariaDB logs
author: Valters IT
date: 2024/01/01
references:
    - https://nvd.nist.gov/vuln/detail/CVE-2023-39593
logsource:
    category: database
    product: mariadb
detection:
    selection:
        Query|contains: 'sys_exec'
    condition: selection
falsepositives:
    - Legitimate administrative use
level: medium

Suricata Rule

alert tcp $HOME_NET any -> $EXTERNAL_NET any (msg:"CVE-2023-39593 MariaDB sys_exec Exploitation Attempt"; flow:to_server,established; content:"sys_exec"; nocase; classtype:attempted-admin; sid:1000001; rev:1;)

Remediation & Mitigation

Immediate Actions:

  1. Disable sys_exec if not required:
    DROP FUNCTION IF EXISTS sys_exec;
    
  2. Restrict access to sys_exec using database privileges:
    REVOKE EXECUTE ON FUNCTION sys_exec FROM 'public';
    GRANT EXECUTE ON FUNCTION sys_exec TO 'admin'@'localhost';
    
  3. Ensure the MariaDB process runs with minimal privileges (e.g., mysql user with restricted shell).

Long-term Measures:

  • Implement database activity monitoring (DAM) to detect and alert on suspicious queries.
  • Regularly review database user privileges.
  • Keep MariaDB updated to the latest version.
  • Follow the principle of least privilege for all database users.

Valters IT Signature:
This report was generated by Valters IT DevSecOps AI. All information is provided for educational and defensive purposes only. Unauthorized exploitation of vulnerabilities is illegal.

👁️ 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.

MariaDB port:3306
MariaDB sys_exec
◈ SOURCE Analysis & enrichment: valtersit.com/cve/CVE-2023-39593/ · 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.