CVE-2026-142187
GORM through 1. 31. 2 SQL Injection via Migrator. CreateView on MySQL and MariaDB
- Severity
- 8.3HighNetwork attack, no privileges, no user interactionCVSS 4.0, CVE List
- Exploitation
- UnknownNo source reports exploitation yet.
- Exploit chance
- 0.60% in 30 daysPercentile50thEPSS, scored
- Listed fix
- None listedNo source lists a fixed version in its version data.Check the description and references.
Overview
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.
CVSS 4.0 vector
Exploitability
- Attack vector
- Network
- Complexity
- High
- Attack requirements
- Present
- Privileges needed
- None
- User interaction
- None
Impact on the vulnerable system
- Confidentiality
- High
- Integrity
- Low
- Availability
- None
Impact on subsequent systems
- Confidentiality
- None
- Integrity
- None
- Availability
- None
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:NExploit chance over time
Affected
Products 1
Sources
CVE List Score usedCVSS 4.08.3
GORM through 1.31.2 SQL Injection via Migrator.CreateView on MySQL and MariaDB
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.
- Record
CVE-2026-142187- CVSS 4.0
- 8.3 High
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-12-02
EUVDEUVD-2026-141518CVSS 4.08.3
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.
- Record
EUVD-2026-141518- CVSS 4.0
- 8.3 High
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - Updated
- 2026-12-02
GitHub AdvisoriesGHSA-4wgc-ch5v-g36cCVSS 4.08.3
GORM through 1.31.2 contains an sql injection vulnerability in Migrator.CreateView that allows...
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.
- Record
GHSA-4wgc-ch5v-g36c- CVSS 4.0
- 8.3 High
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-12-02
NVDCVSS 4.08.3
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.
- Record
CVE-2026-142187- CVSS 4.0
- 8.3 High
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:L/A:N - Weakness
- CWE-89
- Updated
- 2026-12-02
OSVCVSS 4.08.3
GORM through 1.31.2 SQL Injection via Migrator.CreateView on MySQL and MariaDB
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.
- Record
CVE-2026-142187- CVSS 4.0
- 8.3 High
CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N - Weakness
- CWE-89
- Updated
- 2026-12-03
History
Recorded by Every CVE
| Day | Changed | Sources |
|---|---|---|
| Published date | CVE List, EUVD, NVD | |
| Published date | EUVD | |
| Other IDs, references, severity | GitHub Advisories | |
| Other IDs, published date | EUVD | |
| References | OSV | |
| Severity | NVD | |
| First indexed | CVE List |
Upstream dates may differ.
References
github.com/go-gorm/gorm/blob/v1.31.2/migrator/migrator.go
github.com/go-gorm/gorm/blob/v1.31.2/logger/sql.go
vulncheck.com/advisories/gorm-through-1.31.2-sql-injection-via-migrator-createview-on-mysql-and-mariadb
nvd.nist.gov/vuln/detail/CVE-2026-142187
github.com/advisories/GHSA-4wgc-ch5v-g36c
github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142187.json
github.com/go-gorm/gorm