Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessReach app path that calls CreateView
-
DeliverySubmit bound value containing backslash
-
ExploitBackslash-quote terminates SQL literal early
-
ExecutionInjected SQL alters view definition
-
ImpactRead exposed columns (password hashes)
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires that the application invoke GORM's Migrator.CreateView with a subquery containing bound values, AND that at least one of those bound values is attacker-influenceable, AND that the underlying database is MySQL or MariaDB (backslash is a string escape character there) - the VulnCheck advisory scopes the issue to MySQL/MariaDB specifically. The concrete trigger is a bound value containing a backslash immediately before a quote, which logger.ExplainSQL inlines unescaped so the literal terminates early. Limiting factors: view creation is typically a migration/operator-time operation, so attacker-controlled data must actually flow into that path (reflected in CVSS AC:H and AT:P); non-MySQL/MariaDB backends (e.g. PostgreSQL, SQLite) are not indicated as affected; and no special user interaction is required once such a data path exists. |
| Impact | This is a genuine but conditionally-gated issue rather than a drop-everything emergency. The supplied CVSS 4.0 vector (AV:N/AC:H/AT:P/PR:N/UI:N) scores 8.3 (High): network-reachable and nominally unauthenticated (PR:N), but it carries both AC:H (high attack complexity) and AT:P (a present attack requirement), signaling that successful exploitation depends on conditions outside the attacker's direct control. The impact is skewed to confidentiality (VC:H) with only low integrity (VI:L) and no availability effect - consistent with a CWE-89 SQL injection that rewrites a view definition to surface protected columns such as password hashes. No EPSS score, no CISA KEV entry, and no proof-of-concept were provided in the input, so exploitation status is: no public exploit identified at time of analysis. The vuln.today decision label is 'this_week', and the only cited intelligence source is a VulnCheck advisory plus two GitHub source-line references - there is no independent NVD enrichment or vendor (go-gorm) advisory URL in the data set. Net assessment: real and worth remediating on a near-term (this-week) cadence, but its practical reach is limited by the specific requirement that an application routes attacker-controlled bound values into Migrator.CreateView on MySQL/MariaDB, which the AC:H/AT:P metrics reflect. Note the PR:N claim is debatable: view creation is usually an operator/migration-time operation, so whether an external unauthenticated attacker can reach that code path is deployment-specific - verify the data flow in the affected application. |
| Exploit ScenarioDerived | An application uses GORM's Migrator.CreateView with a subquery whose bound values are derived from untrusted input; an attacker supplies a value containing a backslash so that logger.ExplainSQL inlines it without escaping, and the backslash-quote sequence terminates the SQL string literal early. The injected fragment rewrites the view definition to include sensitive columns (for example password hashes), which the attacker then reads back through the view. No public proof-of-concept was provided, and the AC:H/AT:P metrics indicate the attacker must get their input into the view-creation path and satisfy MySQL/MariaDB-specific escaping behavior. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Dec 02, 2026
SQL injection in GORM's Migrator.CreateView (through 1.31.2) on MySQL and MariaDB can let an attacker who controls a bound subquery value alter generated view definitions and potentially expose sensitive columns such as password hashes. Exploitation is gated by an application actually passing attacker-influenceable bound values into CreateView, which is typically a migration-time or operator-time operation; PostgreSQL and SQLite are not indicated as affected. The supplied data does not confirm CISA KEV active exploitation and no public exploit code was identified at time of analysis; the VulnCheck-based priority is this_week.
RemediationAI
No vendor-released patch or fixed GORM version is identified in the supplied data; the provided references point to source code at v1.31.2 and the VulnCheck advisory, so monitor https://www.vulncheck.com/advisories/gorm-through-1.31.2-sql-injection-via-migrator-createview-on-mysql-and-mariadb for updated fixed-version guidance. Until a fix is available, the concrete control is to ensure attacker-influenceable values never reach bound parameters passed to Migrator.CreateView: build view definitions from trusted constants or strictly allowlisted identifiers, and run view-creation migrations as a trusted operator task; this removes the vulnerable data path but may require application redesign. If that data flow cannot be eliminated, avoid creating views through GORM on MySQL/MariaDB for that path or use a backend not indicated as affected, such as PostgreSQL or SQLite, accepting the operational cost of a database change. Restricting the database privileges available to migration code reduces what a successful injection could read but does not fix the injection itself.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
GORM is a Go ORM, and Migrator.CreateView builds a CREATE VIEW statement from a supplied subquery. The referenced code shows logger.ExplainSQL inlining bound parameter values without escaping backslashes; on MySQL and MariaDB, where backslash is a string escape character, a bound value containing a backslash immediately before a quote can terminate the SQL string literal early and cause following content to be parsed as SQL. This is CWE-89 SQL injection in the view-definition path, with the advisory scoped specifically to MySQL/MariaDB; the independent assessment notes that PostgreSQL and SQLite are not indicated as affected. The trigger requires the application to invoke CreateView with a subquery containing bound values and at least one attacker-influenceable value; because view creation is usually a migration/operator-time action, the assessed CVSS vector's high attack complexity and attack precondition reflect the need for such a data path to exist.
Know when Gorm gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
AC:H because exploitation needs attacker input routed into CreateView and MySQL/MariaDB escaping behavior; PR:N as no auth is inherent to the SQLi; C:H (reads protected columns), I:L (view definition altered), A:N.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Executive ViewAI
A high-severity SQL injection vulnerability in GORM's Migrator.CreateView (versions through 1.31.2) on MySQL and MariaDB could allow an attacker who controls bound subquery values to alter database view definitions and expose sensitive columns like password hashes. Applications that pass attacker-influenceable values into CreateView during migrations or operator actions are at risk, potentially leading to unauthorized data disclosure. Leadership should prioritize remediation because this could compromise credential integrity and require incident response.
No vendor-released patch identified at time of analysis. Interim mitigations include input validation and parameterization of CreateView arguments, restricting database permissions to prevent unauthorized view creation, auditing and monitoring view definition changes, and avoiding CreateView with attacker-influenceable bound values.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
EUVD-2026-141518
GHSA-4wgc-ch5v-g36c
NVD
CVE.org
Vulnrichment
Exploit-DB