freenode

← CVE tracker

CVE-2026-142187

GORM through 1.31.2 SQL Injection via Migrator.CreateView on MySQL and MariaDB

Severity
high CVSS 8.3 (v4.0)
Affects
GORM · go-gorm
Weakness
CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Published
2 December 2026 by VulnCheck
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.

Our coverage

We have not written about this one. Know why it matters? Send a tip.