Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as workspace admin with DATA_MODEL
-
DeliverySend PATCH/updateOneField altering searchVector asExpression
-
ExploitBreak out of GENERATED ALWAYS AS (...) clause
-
ExecutionTrigger schema migration executing DDL
-
PersistRun arbitrary SQL as app DB user
-
ImpactExfiltrate or destroy database data
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 an authenticated Twenty account that is a workspace administrator holding the DATA_MODEL permission (per CVSS PR:H) and network access to the metadata API. The specific trigger is supplying a crafted settings.asExpression value for the system TS_VECTOR searchVector field via PATCH /rest/metadata/fields/:id or the updateOneField GraphQL mutation on a version prior to 2.15.0. Limiting factors: this is not exploitable by unauthenticated or low-privilege users, no default/unprivileged path exists, and the impact is bounded by the privileges of the application's PostgreSQL role - a least-privileged DB role constrains what injected SQL can achieve. No special non-default product configuration is otherwise needed beyond possessing the DATA_MODEL grant. |
| Impact | The CVSS 3.1 vector (AV:N/AC:L/PR:H/UI:N/S:C, C:H/I:H/A:H = 9.1) is internally consistent with the description: network-reachable REST/GraphQL endpoints, low complexity, no user interaction, but high privileges (workspace admin with DATA_MODEL). The scope change (S:C) is justified because arbitrary SQL as the application DB user reaches beyond the vulnerable metadata component into the entire database, plausibly across tenants. The dominant limiting factor is PR:H - this is not an unauthenticated internet-facing bug; the attacker must already control a privileged workspace-admin account, which sharply narrows the realistic threat to malicious or compromised administrators and insider/privilege-abuse scenarios rather than mass exploitation. No EPSS score was provided and the CVE is not in CISA KEV, so there is no signal of active or automatable widespread exploitation. Net: a genuinely high-impact post-authentication flaw worth prompt patching, but not a drive-by mass-exploitation priority given the high-privilege precondition. |
| Exploit ScenarioDerived | A malicious or compromised workspace administrator with the DATA_MODEL permission sends a PATCH /rest/metadata/fields/:id (or updateOneField GraphQL mutation) targeting the searchVector field with a crafted asExpression that closes the GENERATED ALWAYS AS (...) clause and appends attacker SQL. When Twenty applies the schema migration, the injected statements run as the application database user, allowing data exfiltration, tampering, or destructive DDL. No public exploit code is identified, but the fix's test cases demonstrate concrete breakout payloads (statement terminators, dollar-quoting and quoted-identifier desync tricks). |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 11, 2026
SQL injection in Twenty, an open-source CRM platform, lets a workspace administrator holding the DATA_MODEL permission inject arbitrary PostgreSQL into the DDL of the system searchVector TS_VECTOR field. By supplying a crafted settings.asExpression via PATCH /rest/metadata/fields/:id or the updateOneField GraphQL mutation, the attacker breaks out of the GENERATED ALWAYS AS (...) column clause and executes statements as the application database user, compromising all workspace data. It is fixed in 2.15.0, requires authenticated high-privilege access (CVSS 9.1, PR:H), and has no public exploit identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade Twenty to version 2.15.0 or later, which adds isSafeTsVectorExpression validation in validate-ts-vector-flat-field-metadata.util.ts and a last-resort assertSafeTsVectorExpression guard at the DDL sink in build-sql-column-definition.util.ts (see advisory GHSA-mm7j-q9q3-qqwj and PR #21947). If immediate upgrade is not possible, restrict who holds the DATA_MODEL permission to the minimum trusted set and audit workspace-admin accounts, since exploitation requires that privilege; additionally, run the Twenty application's PostgreSQL role with least privilege (no superuser, no ability to create/drop objects outside its needed schema) so that injected DDL/DML is contained, and monitor for unexpected field-metadata changes to searchVector via PATCH /rest/metadata/fields/:id or updateOneField mutations. Note the trade-off: tightening the DB role or DATA_MODEL grants may break legitimate schema-customization workflows, so validate in staging before enforcing.
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
Twenty models CRM objects through a dynamic metadata layer that generates PostgreSQL schema at runtime. The searchVector field is a system TS_VECTOR column whose SQL expression is normally produced server-side by getTsVectorColumnExpressionFromFields and rendered by buildSqlColumnDefinition into a GENERATED ALWAYS AS (<asExpression>) STORED clause. The root cause is CWE-89 (SQL injection): the metadata API path allowed a client-supplied asExpression to reach this DDL sink where it was concatenated without escaping or validation, on the mistaken assumption (documented in the pre-fix code comment) that asExpression was always internally generated. Because the injection lands inside a generated-column definition executed via DDL, the attacker can close the AS(...) parenthesis and append sibling clauses or terminate the statement entirely, running as the application's PostgreSQL role. The affected package is twentyhq:twenty (cpe:2.3:a:twentyhq:twenty), specifically packages/twenty-server.
Know when Twenty 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
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Network-reachable metadata API with low complexity and no UI, but requires the high-privilege DATA_MODEL workspace-admin role (PR:H); arbitrary SQL as the DB user escapes the component (S:C) with full C/I/A loss.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Twenty is an open-source CRM (customer relationship management) platform. Prior to 2.15.0, Twenty allowed a workspace administrator with the DATA_MODEL permission to supply settings.asExpression for the system TS_VECTOR field searchVector through PATCH /rest/metadata/fields/:id or the updateOneField GraphQL mutation, causing buildSqlColumnDefinition in packages/twenty-server/src/engine/twenty-orm/workspace-schema-manager/utils/build-sql-column-definition.util.ts to concatenate unescaped input into GENERATED ALWAYS AS (...) and execute arbitrary PostgreSQL statements as the application database user. This issue is fixed in version 2.15.0.
Articles & Coverage 1
Executive ViewAI
Twenty CRM deployments contain a critical SQL injection vulnerability allowing authenticated workspace administrators with DATA_MODEL permissions to execute arbitrary database commands, resulting in complete compromise of all workspace data including customer records, transactions, and proprietary business information. Exploitation requires high-privilege administrative access but provides direct, unrestricted database manipulation. This poses severe risk if administrative credentials are compromised or if insider threats with these permissions exploit the vulnerability.
Apply vendor patch.
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.
Twenty CRM v1.15.0 has a code injection vulnerability enabling remote attackers to execute arbitrary code through the CR
The CRM platform Twenty is vulnerable to stored cross site scripting via file upload in version 0.3.0. Rated high severi
Remote code execution in Twenty CRM versions 1.7.7 through 1.16.7 allows authenticated users to execute arbitrary OS com
Plaintext IMAP, SMTP, and CalDAV passwords belonging to other workspace members are disclosed to any authenticated low-p
The CRM platform Twenty version 0.3.0 is vulnerable to SSRF via file upload. Rated medium severity (CVSS 5.4), this vuln
Stored cross-site scripting in Twenty CRM versions 1.18.0 and earlier allows authenticated users to upload HTML/JavaScri
Server-side request forgery (SSRF) in Twenty CRM allows authenticated users to bypass IP filtering protections and acces
Cross-workspace data disclosure in Twenty CRM before 2.9.0 lets any authenticated user holding the AI settings flag (a w
Field-level read permission bypass in Twenty CRM before 2.22.0 lets an authenticated workspace member or API key that is
Twenty CRM before 2.35.0 fails to enforce field- and row-level permission checks inside the groupBy-with-records GraphQL
Stored cross-site scripting in Twenty CRM versions prior to 1.20.6 allows authenticated attackers to inject malicious Ja
OAuth authorization code forwarding to attacker-controlled hosts is enabled by an open redirect flaw in Twenty CRM throu
EUVD-2026-56221
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB