Skip to content
VulniPulse
Medium5.3Red Hat Linux

Medium [CVE-2026-59894] Arbitrary code execution via unescaped backslashes in generated snippets

This medium-severity Red Hat Linux advisory covers CVE-2026-59894 affecting Red Hat Ansible Automation Platform 2, Red Hat Discovery 2, Red Hat OpenShift AI (RHOAI).

CVE-2026-59894 Published Aug 17, 2026Updated by vendor Aug 17, 2026
Affected products & platforms
Red Hat LinuxUnclassified
Open vendor advisory

Android app · Google Play

Monitor future Red Hat Linux CVEs from your phone.

Choose a whole vendor or a precise platform, then receive matching security advisories by phone notification, email, or both. Coverage follows 32 official vendor sources and 160+ reviewed platform categories.

Matching phone alertsOptional email delivery

Summary

sqlparse is a non-validating SQL parser module for Python.

Prior to 0.6.0, sqlparse/filters/output.py fails to escape existing backslashes before quotes in sqlparse.format output_format='python' and output_format='php' and the corresponding sqlformat -l modes, allowing crafted SQL to terminate the generated string and inject Python or PHP code when a downstream consumer executes or imports the generated source.

This issue is fixed in version 0.6.0. Successful exploitation could lead to arbitrary code execution, significantly impacting the confidentiality and integrity of the system.

Red Hat severity: Moderate — CVSS 5.3 (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L). Weakness: CWE-94.

Affected Red Hat products: Red Hat Ansible Automation Platform 2; Red Hat Discovery 2; Red Hat OpenShift AI (RHOAI); Red Hat OpenShift Container Platform 4; Red Hat OpenStack Platform 16.2; Red Hat OpenStack Platform 17.1; Red Hat OpenStack Platform 18.0; Red Hat Satellite 6; Red Hat Update Infrastructure 4 for Cloud Providers; Red Hat Update Infrastructure 5; Self-service automation portal 2.

Will not fix / out of support: Red Hat Ansible Automation Platform 2; Red Hat OpenStack Platform 16.2; Red Hat OpenStack Platform 17.1; Red Hat Update Infrastructure 4 for Cloud Providers. Red Hat does not currently list a fixing RHSA for this CVE.

Affected versions
  • < 0.6.0

Official advisory · high-confidence parse· fetched 39 minutes ago·verify at source

Fixed versions
  • 0.6.0

Official advisory · high-confidence parse· fetched 39 minutes ago·verify at source

Mitigation

Upgrade to a fixed release: 0.6.0. That is the remediation for this advisory.

The vendor advisory may list additional interim mitigations or workarounds not captured here — review it before change work.

Official advisory · high-confidence parse· fetched 39 minutes ago·verify at source

Discussion(0)

No comments yet. Share field notes, upgrade gotchas, or questions — verify against the vendor advisory before acting on community advice.

Sign in to join the discussion.