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
Source GCVE Database
Not known to be exploited · CVSS 8.3 High.
Data as of 2 Dec 2026, 19:46 UTC
Thin evidence
One scorer or none| CNA (VulnCheck) | CVSS 4.0 | 8.3 |
|---|---|---|
| CNA (VulnCheck) | CVSS 3.1 | 6.5 |
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 2 Dec 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2 Dec 2026.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| go-gormGORM | Affected
| Fixed in– |
GoGORMpkg:golang/GORMOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
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.
References
- nvd.nist.gov/vuln/detail/CVE-2026-142187 (opens in a new tab)
- github.com/go-gorm/gorm/blob/v1.31.2/logger/sql.go (opens in a new tab)
- github.com/go-gorm/gorm/blob/v1.31.2/migrator/migrator.go (opens in a new tab)
- vulncheck.com/advisories/gorm-through-1.31.2-sql-injection-via-migrator-createview-on-mysql-and-mariadb (opens in a new tab)