Bug 2589029 (CVE-2026-142187)

Summary: CVE-2026-142187 gorm.io/gorm: github.com/go-gorm/gorm: gorm.io/gorm: Information disclosure via SQL injection in database view creation
Product: [Other] Security Response Reporter: OSIDB Bzimport <bzimport>
Component: vulnerabilityAssignee: Product Security DevOps Team <prodsec-dev>
Status: NEW --- QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedKeywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
A flaw was found in gorm.io/gorm. This Structured Query Language (SQL) injection vulnerability occurs during database view creation when bound subquery values containing backslashes are improperly escaped. A remote attacker can exploit this issue by supplying crafted inputs to alter view definitions, resulting in unauthorized information disclosure of sensitive database content.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description OSIDB Bzimport 2026-12-02 20:32:02 UTC
GORM through 1.31.2 contains an sql injection vulnerability in Migrator.CreateView that allows attackers to inject SQL by supplying bound subquery values containing backslashes. Because logger.ExplainSQL inlines values without escaping backslashes, a backslash-quote sequence terminates the literal early, letting attackers alter view definitions to expose columns like password hashes.