CVE-2026-142187

Source
https://cve.org/CVERecord?id=CVE-2026-142187
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142187.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2026-142187
Published
2026-12-02T16:51:03Z
Modified
2026-12-02T21:45:21Z
Severity
  • 8.3 (High) CVSS_V4 - 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 Calculator
Summary
GORM through 1.31.2 SQL Injection via Migrator.CreateView on MySQL and MariaDB
Details

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.

Database specific
{
    "cna_assigner":  "VulnCheck",
    "cwe_ids":  [
        "CWE-89"
    ],
    "osv_generated_from":  "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/142xxx/CVE-2026-142187.json"
}
References

Affected packages

Git / github.com/go-gorm/gorm

Affected ranges

Type
GIT
Repo
https://github.com/go-gorm/gorm
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Last Affected
Database specific
Show details
{
    "extracted_events":  [
        {
            "range":  [
                {
                    "introduced":  "0"
                },
                {
                    "last_affected":  "1.31.2"
                }
            ],
            "source":  "AFFECTED_FIELD",
            "strategy":  "StandardRange"
        }
    ]
}

Affected versions

v0.*
v0.2.0
v0.2.1
v0.2.10
v0.2.11
v0.2.12
v0.2.13
v0.2.14
v0.2.15
v0.2.16
v0.2.17
v0.2.18
v0.2.19
v0.2.2
v0.2.20
v0.2.21
v0.2.22
v0.2.23
v0.2.24
v0.2.25
v0.2.26
v0.2.27
v0.2.28
v0.2.29
v0.2.3
v0.2.30
v0.2.31
v0.2.32
v0.2.33
v0.2.34
v0.2.35
v0.2.36
v0.2.37
v0.2.38
v0.2.4
v0.2.5
v0.2.6
v0.2.7
v0.2.8
v0.2.9
v1.*
v1.20.0
v1.20.1
v1.20.10
v1.20.11
v1.20.12
v1.20.2
v1.20.3
v1.20.4
v1.20.5
v1.20.6
v1.20.7
v1.20.8
v1.20.9
v1.21.0
v1.21.1
v1.21.10
v1.21.11
v1.21.12
v1.21.13
v1.21.14
v1.21.15
v1.21.16
v1.21.2
v1.21.3
v1.21.4
v1.21.5
v1.21.6
v1.21.7
v1.21.8
v1.21.9
v1.22.0
v1.22.1
v1.22.2
v1.22.3
v1.22.4
v1.22.5
v1.23.0
v1.23.1
v1.23.10
v1.23.2
v1.23.3
v1.23.4
v1.23.5
v1.23.6
v1.23.7
v1.23.8
v1.23.9
v1.24.0
v1.24.1
v1.24.2
v1.24.3
v1.24.4
v1.24.5
v1.24.6
v1.25.0
v1.25.1
v1.25.10
v1.25.11
v1.25.12
v1.25.2
v1.25.3
v1.25.4
v1.25.5
v1.25.6
v1.25.7
v1.25.8
v1.25.9
v1.26.0
v1.26.1
v1.30.0
v1.30.1
v1.30.2
v1.30.3
v1.30.4
v1.30.5
v1.31.0
v1.31.1
v1.31.2
v1.9.19

Database specific

source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2026-142187.json"