Mar 7, 2026·5 min read·33 visits
PowerSync Service 1.20.0 ignores certain `WHERE` clause filters in sync streams when using `config.edition: 3`. Authenticated users can unintentionally sync restricted data if access is controlled via non-partitioning subqueries. Patched in version 1.20.1.
A critical logic error in PowerSync Service version 1.20.0 causes the synchronization engine to ignore specific subquery filters when using the `config.edition: 3` architecture. This flaw results in an authorization bypass where authenticated users may receive data intended solely for privileged accounts, such as administrators.
PowerSync is a framework designed to synchronize data between a central PostgreSQL database and local SQLite databases on client devices. The service relies on defined 'sync rules' to determine which rows in the central database should be replicated to a specific authenticated user. These rules typically take the form of SQL queries with WHERE clauses that filter data based on the user's identity.
In version 1.20.0, PowerSync introduced a new sync stream architecture, enabled via config.edition: 3. This update contained a logic flaw in the query parser responsible for applying security filters. Specifically, the engine failed to apply 'gating' filters—conditions that determine whether a user should access a table at all—when those filters relied on subqueries. While direct row-level partitioning (e.g., user_id = auth.user_id()) functioned correctly, broad access controls were silently dropped from the execution plan.
This vulnerability manifests as an Information Disclosure (Improper Authorization). An authenticated user connecting to the service effectively receives a full table dump for affected queries, bypassing the intended access control logic defined by the developer.
The root cause lies in the differentiation between partitioning filters and gating filters within the config.edition: 3 execution engine. Partitioning filters are used to slice data (e.g., returning only rows owned by the user), whereas gating filters often act as boolean switches (e.g., allowing access to a table only if the user belongs to a specific group).
The vulnerability specifically affects non-partitioning subqueries. When the query planner encountered a WHERE clause containing a subquery that did not directly correlate a row column to the user ID but instead checked a global condition, the filter was omitted. The engine erroneously treated these complex predicates as non-binding or resolved them to TRUE for all users.
For example, a rule intended to restrict a table to administrators often uses a subquery to check the user's role. Because this subquery does not partition the data by row ID but rather gates the entire dataset, the flawed logic in 1.20.0 discarded the check. Consequently, the query executed without the restriction, synchronizing the entire dataset to any user with a valid session.
The following SQL patterns demonstrate the specific failure modes observed in version 1.20.0. The core issue is the semantic handling of subqueries in the WHERE clause.
In this scenario, the developer intends to sync the sensitive_table only if the requesting user is present in the admins table. The vulnerability causes the WHERE clause to be ignored, resulting in a SELECT * FROM sensitive_table for all users.
-- Vulnerable Query Pattern
SELECT *
FROM sensitive_table
WHERE auth.user_id() IN (
SELECT user_id
FROM admins
);A common pattern involves checking a permissions table to see if a specific resource is allowed. This logic also fails because it relies on a subquery that does not partition the target table directly.
-- Vulnerable Query Pattern
SELECT *
FROM sensitive_table
WHERE 'sensitive_table' IN (
SELECT table_name
FROM synced_table_permissions
WHERE "user" = auth.user_id()
);Standard row-level security patterns that directly compare columns remain effective. The engine correctly processes these because they are identified as partitioning keys.
-- Secure Query Pattern (Unaffected)
SELECT *
FROM sensitive_table
WHERE owner_id = auth.user_id();> [!NOTE]
> The vulnerability is specific to config.edition: 3. Configurations using the older config.edition: 2 or standard bucket definitions are not impacted.
Exploitation of this vulnerability requires no specialized tools or complex attack chains. It is an architectural failure that occurs automatically during the normal synchronization process.
config.edition: 3 enabled.WHERE clause restricting access to sensitive tables (e.g., admin_audit_logs) is ignored.The primary impact is Confidentiality Loss. The severity depends on the nature of the data protected by the affected sync rules. In many applications, these 'gating' queries are used for high-privileged data, such as:
CVSS v3.1 Analysis:
AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N (Score: 6.5)CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N| Product | Affected Versions | Fixed Version |
|---|---|---|
@powersync/service-core PowerSync | = 1.20.0 | 1.20.1 |
@powersync/service-sync-rules PowerSync | <= 0.32.0 | 0.33.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-285 |
| Attack Vector | Network |
| CVSS Score | 6.5 (Medium) |
| Impact | High Confidentiality Loss |
| Component | @powersync/service-core |
| Exploit Status | No Active Exploitation Known |
Improper Authorization
CVE-2026-71869 is a critical-severity code injection vulnerability in the Orval code generator (packages: orval, @orval/core, @orval/zod) prior to version 8.21.0. This flaw allows remote attackers to execute arbitrary JavaScript code at import-time by embedding malicious payloads into the default values of OpenAPI or Swagger specifications. This report details the root cause, exploitation mechanism, and patch remediation.
CVE-2026-61625 is a path traversal vulnerability (CWE-22) within the `vmrestore` utility of VictoriaMetrics. When restoring database shards from a compromised or malicious backup source, the application fails to validate the paths of backup parts before creating and writing files. By injecting objects with directory traversal sequences (such as `../`) into the remote backup storage, an attacker can write arbitrary files to out-of-bounds locations on the system executing the restore operation. Depending on the process privileges, this can result in host compromise via remote code execution.
A medium-severity cache key canonicalization collision vulnerability exists in the ckan-mcp-server prior to version 0.4.112. Unescaped delimiters in key-value parameters and server URLs allow structurally distinct requests to map to the same cryptographic hash, facilitating cache poisoning and unauthorized data exposure.
A stored and reflected Cross-Site Scripting (XSS) vulnerability was identified in the SiYuan kernel before version v3.7.3. The flaw occurs due to a parser differential between the backend Go-based HTML sanitizer and the browser-side XML rendering engine. Attackers can bypass the SVG sanitizer to execute arbitrary JavaScript within the context of the application's origin, leading to complete workspace compromise, data exfiltration, and full local kernel API manipulation.
An incomplete mitigation in the export-handling logic of SiYuan Notebook allowed authenticated users to bypass directory traversal protections. By crafting a request with percent-encoded path navigation sequences targeting the /export/temp/ route prefix, attackers can trigger an unvalidated short-circuit block that serving arbitrary files from the host server. This bypass renders previous path-traversal mitigations ineffective for the affected endpoint.
CVE-2026-62669 is a critical Improper Authentication vulnerability (CWE-287) in the Grav Login Plugin for Grav CMS. Prior to version 3.8.11, the plugin's key rotation task failed to verify if a user session was fully authorized before regenerating and returning two-factor authentication (2FA) secrets. Consequently, an attacker possessing a victim's primary credentials could invoke this endpoint to replace the 2FA secret, retrieve the replacement, and bypass the MFA constraint entirely.