STOQ says that it's okay to have a username, password, and an entire SQL query i...

@north@xn--8r9a.com

STOQ says that it's okay to have a username, password, and an entire SQL query in an HTTP request. Okay, I guess.

---

From: Jason Parker
To: security@stoqapp.com
Date: Fri, Oct 30, 2026 at 2:45 AM
Subject: Disclosure: STOQ Analytics Database Credentials Exposed to Unauthenticated Users

Note

AI was not involved in discovering this vulnerability.

Description

The STOQ Shopify application exposes credentials for its production ClickHouse analytics database to unauthenticated website visitors. These credentials allow anyone to connect directly to the database and submit SQL queries, including INSERT statements.

Although the database account has restricted permissions, it permits writing to the analytics events table. This could allow unauthorized users to inject fabricated analytics events, manipulate reporting data, and potentially consume database resources.

Details

While examining network requests on alfred.com, I discovered that a third-party Shopify application was sending analytics events directly to a ClickHouse Cloud database.

The requests included a database username and password in HTTP headers, both accessible through the browser's developer tools.

Endpoint:
g86t03bsah.us-east-1.aws.click

Username: pixel_ingest

Password: Exposed in browser request headers. Omitted from this report.

The browser submitted SQL statements directly to ClickHouse, including:

INSERT INTO stoq_analytics.stoq_events FORMAT JSONEachRow

Using the exposed credentials, I was able to connect to the database independently using curl, without authenticating to Shopify or STOQ.

The database identified the authenticated user as pixel_ingest and returned its permissions:

GRANT INSERT ON stoq_analytics.stoq_events TO pixel_ingest

The following permission checks confirmed that the account has INSERT access but lacks SELECT access:

CHECK GRANT INSERT ON stoq_analytics.stoq_events
-- Result: 1

CHECK GRANT SELECT ON stoq_analytics.stoq_events
-- Result: 0

An INSERT request returned HTTP 200 without an SQL exception. However, persistence of the submitted record has not been independently verified.

Attempts to read the analytics table were rejected:

Code: 497. DB::Exception: pixel_ingest:
Not enough privileges.
(ACCESS_DENIED)

These restrictions prevent reading the tested table, but do not prevent unauthenticated users from obtaining and using the exposed database credentials.

Impact

The exposed credentials provide direct write access to a production analytics table. Depending on how STOQ processes these records, an attacker could potentially:

Insert fabricated events attributed to Shopify merchants.

Manipulate analytics related to product views, carts, and customer activity.

Generate large numbers of events, consuming database storage and processing resources.

The analytics events also contain session identifiers, cart tokens, and other customer activity metadata.

No unauthorized access to stored records was demonstrated. The account's SELECT permissions appear to be appropriately restricted.

Recommendation

Database credentials should not be exposed to website visitors. Analytics events should instead be submitted through a controlled ingestion endpoint with appropriate validation, rate limiting, and tenant isolation.

The exposed credentials should be rotated and database logs reviewed for unauthorized activity.

Severity

Undetermined. Confirmed database write privileges, with the extent of potential integrity and availability impact not yet established.

---

From: Kartik - STOQ <kartik@support.stoqapp.com>
To: Jason Parker
Date: Oct 30, 2026, 5:40 AM

Hi Jason, thank you for the detailed report.

The login you found is intentional: our storefront analytics script uses a login that can only add events to a single analytics table and cannot read anything, which matches your permission checks. No shopper or merchant data can be read with it. We know it is visible in the browser however the ClickHouse endpoint is a controlled ingestion pipeline that does validation and rate limiting. This design is similar to the Shopify Storefront token that is also public and we do not plan to change the design right now.

Thanks again for reporting it responsibly.

🧵 1/2