CVE-2026-112307
Description
A flaw was found in sqlparse. The PHP output formatting filter does not properly sanitize dollar-sign sequences when formatting SQL statements into PHP code. An attacker can exploit this vulnerability by supplying crafted SQL input containing embedded expressions, leading to arbitrary code execution when the generated PHP snippet is run.
Mitigation
--- CME Mitigation Guidance (2026-10-20) ---
Disclaimer: The following mitigation solutions are provided as a courtesy, pending the application of an official patch. This content was generated utilizing AI tools in conjunction with data from https://cmetaxonomy.org. Customers are advised to independently evaluate and test these temporary mitigations within their own infrastructure.
The highest-value action is to sanitize and escape dollar signs when formatting SQL tokens into PHP double-quoted strings in OutputPHPFilter, or avoid executing generated PHP snippets: upgrade to the fixed Python Sqlparse/Ansible Automation Platform 24/Controller Rhel/Ansible Automation Platform 24/Lightspeed Rhel/Automation Controller/Python3X Sqlparse/Cloudservices/Advisor Backend/Advisor Backend/Python3.11 Sqlparse/Python3.12 Sqlparse/Ansible Automation Platform 26/Hub Rhel/Ansible Automation Platform Tech Preview/Metrics Service Rhel/Ansible Automation Platform 27/Aap Cloud Billing Rhel/Ansible Automation Platform 27/Metrics Service Rhel/Cloudservices/Rbac/Rhoai/Odh Mlflow Rhel/Rhoai/Odh Pipeline Runtime Datascience Cpu Py312 Rhel/Rhoai/Odh Pipeline Runtime Pytorch Cuda Py312 Rhel/Rhoai/Odh Pipeline Runtime Pytorch Llmcompressor Cuda Py312 Rhel/Rhoai/Odh Pipeline Runtime Pytorch Rocm Py312 Rhel/Rhoai/Odh Pipeline Runtime Tensorflow Cuda Py312 Rhel/Rhoai/Odh Pipeline Runtime Tensorflow Rocm Py312 Rhel/Rhoai/Odh Th06 Cpu Torch210 Py312 Rhel/Rhoai/Odh Th06 Cuda130 Torch210 Py312 Rhel/Rhoai/Odh Th06 Rocm64 Torch291 Py312 Rhel/Rhoai/Odh Training Cuda128 Torch29 Py312 Rhel/Rhoai/Odh Workbench Codeserver Datascience Cpu Py312 Rhel/Rhoai/Odh Workbench Jupyter Datascience Cpu Py312 Rhel/Rhoai/Odh Workbench Jupyter Pytorch Cuda Py312 Rhel/Rhoai/Odh Workbench Jupyter Pytorch Llmcompressor Cuda Py312 Rhel/Rhoai/Odh Workbench Jupyter Pytorch Rocm Py312 Rhel/Rhoai/Odh Workbench Jupyter Tensorflow Cuda Py312 Rhel/Rhoai/Odh Workbench Jupyter Tensorflow Rocm Py312 Rhel/Rhoai/Odh Workbench Jupyter Trustyai Cpu Py312 Rhel/Rhoai/Odh Th Torch Cpu Py312 Rhel/Rhoai/Odh Th Torch Cuda Py312 Rhel/Rhoai/Odh Th Torch Rocm Py312 Rhel/Ansible Automation Platform/Automation Dashboard Rhel/Ansible Automation Platform 25/Controller Rhel/Ansible Automation Platform 25/Lightspeed Rhel/Ansible Automation Platform 26/Controller Rhel/Ansible Automation Platform 26/Eda Controller Rhel/Ansible Automation Platform 26/Gateway Rhel/Ansible Automation Platform 26/Lightspeed Rhel/Ansible Automation Platform 27/Controller Rhel/Ansible Automation Platform 27/Eda Controller Rhel/Ansible Automation Platform 27/Gateway Rhel/Ansible Automation Platform 27/Hub Rhel/Ansible Automation Platform 27/Lightspeed Rhel/Galaxy Ng/Automation Hub Container/Ansible Ai Connect Service/Koku/Insights Rbac/Google Lightspeed Agent/Discovery/Discovery Server Rhel/Satellite/Iop Advisor Backend Rhel builds, which escape dollar signs as \$ after backslash and quotation mark escaping in OutputPHPFilter, closing all 3 injection vectors (embedded PHP variable interpolation expressions (${expr}), embedded complex PHP expression interpolation sequences ({${expr}})!, crafted SQL containing unescaped dollar signs). Until patched, this is a concern on Applications on any platform passing untrusted SQL to sqlparse with PHP output formatting where the resulting code is executed in PHP, so Disallow untrusted SQL input from being processed with sqlparse PHP output formatting and prevent execution or evaluation of generated PHP snippets in runtime environments. As a compensating measure, Inspect incoming HTTP payloads with a Web Application Firewall to detect and block SQL input containing PHP variable interpolation patterns such as unescaped dollar-sign expressions, Use an Endpoint Detection and Response agent to detect anomalous post-exploitation behavior or child process spawning triggered when the PHP runtime evaluates injected expressions, and Deploy Falco or eBPF runtime security to detect unexpected shells or suspicious system calls spawned by the PHP process executing injected code. These controls limit blast radius and contain exploitation, but they do not fix the underlying unescaped PHP string interpolation defect — apply the upstream patch to fully remediate.
Highest-impact CME: CME-1309 Script Engine Restriction (Sandbox / Disable) (high)
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 | 7.3 | N/A | 7.3 |
| Attack Vector | Local | N/A | Local |
| Attack Complexity | Low | N/A | Low |
| Privileges Required | None | N/A | None |
| User Interaction | Required | N/A | Required |
| Scope | Unchanged | N/A | Unchanged |
| Confidentiality | High | N/A | High |
| Integrity Impact | High | N/A | High |
| Availability Impact | Low | N/A | Low |
Vector
Red Hat: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
cve.org: CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:L
Frequently Asked Questions
Not sure what something means? Check out our Security Glossary.
Want to get errata notifications? Sign up here.