Skip to content

CVE-2026-142187 GORM through 1.31.2 SQL Injection via Migrator.CreateView on MySQL and MariaDB

HighCVSS 8.3 EPSS 0.60%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
No known exploitation · automatable: no · technical impact: partial
Technology
MySQLMariaDBRed Hat

Description

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.

Upgrade path

1 package: 1 fixed.

PackageAffectedFixed inStatus
gorm.io/gorm <= 1.31.2 after 1.31.2 Fixed

Affected products

ProductAffected versionsFixed in
gorm.io/gorm <= 1.31.2 No fix listed

References