CVE-2026-85748
Description
A flaw was found in MariaDB. An authenticated database user with low privileges can trigger a use-after-free memory corruption condition during cursor FETCH operations involving SYS_REFCURSOR. This flaw allows an attacker to corrupt memory and hijack program execution flow, potentially leading to privilege escalation and arbitrary code execution on the host system or causing a denial of service (DoS) by crashing the database server.
Statement
A use-after-free vulnerability was found in MariaDB's SYS_REFCURSOR handling. When a large number of SYS_REFCURSOR cursors are opened, a Dynamic_array reallocation can leave dangling pointers that are later dereferenced during FETCH operations. An authenticated SQL user with low privileges can exploit this to gain control of the instruction pointer. SYS_REFCURSOR was introduced in MariaDB 12.0; no version of MariaDB shipped in Red Hat Enterprise Linux contains this feature. Fedora ships MariaDB 12.3, which is affected.
Mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.
Common Vulnerability Scoring System (CVSS) Score Details
Info alert:Important note
CVSS scores for open source components depend on vendor-specific factors (e.g. version or build chain). Therefore, Red Hat's score and impact rating can be different from NVD and other vendors. Red Hat remains the authoritative CVE Naming Authority (CNA) source for its products and services (see Red Hat classifications).
The following CVSS metrics and score provided are preliminary and subject to review.
CVSS v3 Score Breakdown
| Red Hat | NVD | cve.org | |
|---|---|---|---|
| Base Score | 8.5 | N/A | 9.9 |
| Attack Vector | Network | N/A | Network |
| Attack Complexity | High | N/A | Low |
| Privileges Required | Low | N/A | Low |
| User Interaction | None | N/A | None |
| Scope | Changed | N/A | Changed |
| Confidentiality | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | High | N/A | High |
Vector
Red Hat: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
cve.org: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Red Hat CVSS v3 Score Explanation
Corrected from GHSA 9.9 (AC:L) to researcher's 8.5 (AC:H). Exploitation requires chaining UAF with separate OOB read for ASLR bypass, build-specific COOP gadgets, and ~50% reliability. AC:H better reflects multi-step chain complexity.
Understanding the Weakness (CWE)
Integrity
Technical Impact: Modify Memory
The use of previously freed memory may corrupt valid data, if the memory area in question has been allocated and used properly elsewhere.
Availability
Technical Impact: DoS: Crash, Exit, or Restart
If chunk consolidation occurs after the use of previously freed data, the process may crash when invalid data is used as chunk information.
Confidentiality
Technical Impact: Read Memory
Read operations on freed memory can sometimes leak sensitive information instead of causing a crash
Integrity,Confidentiality,Availability
Technical Impact: Execute Unauthorized Code or Commands
If malicious data is entered before chunk consolidation can take place, it may be possible to take advantage of a write-what-where primitive to execute arbitrary code. If the newly allocated data happens to hold a class, in C++ for example, various function pointers may be scattered within the heap data. If one of these function pointers is overwritten with an address to valid shellcode, execution of arbitrary code can be achieved.
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.