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.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| gorm.io/gorm | <= 1.31.2 | after 1.31.2 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| gorm.io/gorm | <= 1.31.2 | No fix listed |
References
- github.com technical-description
- github.com technical-description
- VulnCheck Advisory: GORM through 1.31.2 SQL Injection via Migrator.CreateView on MySQL and MariaDB third-party-advisory
- ENISA EUVD EUVD-2026-141518 third-party-advisory
- nvd.nist.gov
- Red Hat CVE page mitigation vendor-advisory
- Red Hat Bugzilla 2589029 issue-tracking
- www.cve.org