AploSec / Disclosures / CVE-2026-142187

High 8.3ReportedNo fix listedCWE-89Go

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

CVE-2026-142187 · published 2026-12-02

In plain words: this type of bug lets someone change the queries sent to the database (SQL injection). No fixed release is listed yet.

Summary

CVE-2026-142187 affects GORM (Go) <= 1.31.2: SQL Injection via Migrator.CreateView on MySQL and MariaDB (CWE-89). No fixed release is listed. CVSS 4.0 base score 8.3 (High), assigned by VulnCheck. Published 2026-12-02 by VulnCheck. Credit: Zachariah Mithani (AploSec).

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.

Evidence

Reported to the maintainer. The public advisory and references below describe the evidence and preconditions; reporting status alone does not establish independent reproduction.

Remediation

No fixed release is listed in the advisory. Check the references for upstream status.

References

Severity
High 8.3CVSS 4.0, scored by VulnCheck in the CVE record
Package
GORM
Ecosystem
Go
Affected
<= 1.31.2
Fixed
None
Weakness
CWE-89
CNA
VulnCheck
Credit
Zachariah Mithani (AploSec)finder