Feb 3, 2026·5 min read·50 visits
Decidim used UUIDs for private exports, but the database column expected Integers. Ruby cast the UUIDs (e.g., 'a1b2...') to '0', causing different users' files to overwrite each other or be served interchangeably. Attackers could simply request their own data and receive someone else's sensitive ZIP file.
A critical type confusion vulnerability in Decidim's 'Download Your Data' feature turned a privacy compliance tool into a data leak hose. Due to a mismatch between Ruby on Rails' ActiveStorage schema and Decidim's use of UUIDs, unique export IDs were silently cast to integers, causing massive database collisions. This allowed users requesting their own data to accidentally download full data dumps belonging to other users.
Irony is the lifeblood of the security industry, and CVE-2025-65017 is a vintage bottle of it. Decidim, a platform designed for participatory democracy and citizen engagement, naturally has a 'Download Your Data' feature. It's a GDPR requirement, designed to give users control and transparency over their private information.
But in software engineering, the road to hell is paved with type mismatches. In versions 0.30.0 through 0.31.0, this exact feature—the one explicitly built to protect user agency—became a mechanism for unauthenticated (or low-privilege) mass data disclosure. The bug wasn't a complex buffer overflow or a sophisticated injection. It was a simple case of the database speaking one language (Integers) and the application speaking another (UUIDs), with the translator (Ruby) doing a terrible job in the middle.
Imagine walking into a coat check, handing them ticket 'A123', and the attendant ripping off the 'A', seeing '0', and handing you the coat belonging to the guy with ticket 'B456' (which also became '0'). That is effectively what happened here, but instead of coats, it was ZIP files containing voting history, private messages, and user metadata.
The root cause is a classic mismatch in the Active Record ecosystem. When Decidim introduced the PrivateExport model, they correctly decided to use UUIDs for primary keys. UUIDs are great; they are unguessable and prevent enumeration attacks. However, they attached files to this model using Rails' ActiveStorage.
Here lies the trap: By default, the active_storage_attachments table defines its record_id column as a bigint. It expects a number. When you try to save an attachment associated with a record that has a UUID string for an ID, the system has to make a choice. Instead of throwing an error, the database adapter (or Ruby itself, depending on the layer) attempts a cast.
In Ruby, string-to-integer casting is notoriously permissive. It parses until it hits a non-numeric character.
0210ae70... becomes Integer 210.e9540f96... (starting with a letter) becomes Integer 0.Since UUIDs are hexadecimal, a significant portion of all generated IDs begin with a letter (a through f). Every single one of those exports was saved into the database with a record_id of 0. The entropy of a 128-bit UUID was instantly crushed into a single digit.
Let's look at the implementation that caused this collision. The developers defined the model to use the UUID, but failed to update the underlying storage association to handle it.
The Vulnerable Model:
# app/models/decidim/private_export.rb
class PrivateExport < ApplicationRecord
# This implies id is a UUID string
include Decidim::HasUploadValidations
# The retrieval logic
def self.retrieve(user)
# Finds the record by UUID, but the attachment is linked by INT
user.private_exports.order(created_at: :desc).first
end
endThe Invisible Failure:
When ActiveStorage saves the attachment, it executes SQL similar to this:
INSERT INTO active_storage_attachments (record_id, record_type, ...)
VALUES ('e9540f...', 'Decidim::PrivateExport', ...);Because the column record_id is bigint, Postgres (or the driver) casts 'e9540f...' to 0.
The Dangerous Retrieval:
When a user clicks download, the controller looks up the export. Even if the controller finds the correct PrivateExport record (with UUID e9540f...), when it asks for the file, ActiveStorage queries:
SELECT * FROM active_storage_attachments
WHERE record_id = 0 -- collision!
AND record_type = 'Decidim::PrivateExport';If 50 users have exports starting with a letter, they all share ID 0. The database returns the first one it finds. You just downloaded someone else's life.
Exploiting this requires zero technical skill, just patience and a registered account. It is a game of "Data Roulette."
Step 1: The Setup An attacker creates an account on the target Decidim instance. They navigate to the "Download Your Data" section and request an export.
Step 2: The Trigger
The system generates a UUID for the export. The attacker doesn't control this UUID, but probability is on their side. There is a ~37.5% chance the UUID starts with a letter (a-f), causing it to map to ID 0.
Step 3: The Collection
The attacker polls the download endpoint. If their export mapped to 0, and a victim also requested an export that mapped to 0, the database now holds multiple attachments for ID 0.
Depending on the database sort order (usually insertion order or primary key), the attacker's request might serve up the most recent file added to ID 0. If the victim requested their export after the attacker, the attacker's subsequent download attempts could fetch the victim's ZIP file.
No SQL injection, no XSS. Just bad schema design and a download button.
The remediation for CVE-2025-65017 was drastic but necessary. You cannot simply "un-mix" the data. Once multiple files are associated with ID 0, there is no reliable way to know which file belongs to which UUID. The metadata linkage is severed.
1. Schema Change:
The patch involved a migration to change the PrivateExport primary key back to a standard auto-incrementing Integer (id) to satisfy ActiveStorage, while moving the UUID to a dedicated, separate column (uuid) for public-facing lookups.
2. The Purge:
The most painful part of the fix was the cleanup. A rake task (decidim:upgrade:clean:remove_private_exports_attachments) was released to physically delete all existing private export attachments. It was the only safe move: treat all cached data as compromised.
3. Scoped Lookup:
The controller logic was tightened to ensure that even if a collision theoretically happened, the query is strictly scoped to the current_user's association, though the schema change fundamentally solves the root cause.
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N| Product | Affected Versions | Fixed Version |
|---|---|---|
Decidim Decidim | >= 0.30.0 < 0.30.4 | 0.30.4 |
Decidim Decidim | >= 0.31.0.rc1 < 0.31.0 | 0.31.0 |
| Attribute | Detail |
|---|---|
| CWE ID | CWE-200 (Info Disclosure) |
| CWE ID | CWE-703 (Improper Check of Unusual Conditions) |
| CVSS v4.0 | 8.2 (High) |
| Attack Vector | Network |
| Privileges | Low (Any User) |
| Impact | Confidentiality Loss (Total for affected scope) |
The application implicitly casts distinct UUID strings to identical integers (often 0), causing object reference collisions.
A Denial of Service (DoS) vulnerability exists in the web display module (urwid/display/web.py) of the Urwid console user interface library for Python in versions prior to 4.0.7. The handle_short_request() function unconditionally encodes HTTP POST input as ASCII without exception handling and opens a FIFO pipe file descriptor without a guaranteed cleanup block. Submitting non-ASCII characters triggers an unhandled UnicodeEncodeError that terminates CGI request processing and leaks the open file descriptor. Additionally, the screen update polling routine decodes Unix domain socket streams iteratively as UTF-8 without exception handling or deterministic socket closure, enabling uncaught UnicodeDecodeError exceptions and socket leaks.
CVE-2026-115770 is a critical vulnerability (CVSS 9.6) in Pocket ID, an OpenID Connect (OIDC) provider that uses passkey authentication. In versions 2.2.0 through 2.11.0, email verification tokens are bound exclusively to the user account identifier (user_id) rather than the specific email address for which the token was issued. In addition, updating the account email address does not invalidate existing verification tokens. An authenticated user can request a verification token for an attacker-controlled address, modify their profile email to an arbitrary unverified target address, and redeem the previously issued token. This marks the target email address as verified (email_verified = true), enabling account takeover on downstream OIDC relying parties that link or provision accounts based on verified email claims.
CVE-2026-102895 is an improper authentication and origin validation vulnerability in GPUStack versions prior to 2.2.0. By default, the API authentication dependency in gpustack/api/auth.py grants built-in administrator privileges to unauthenticated requests resolved as originating from 127.0.0.1 when the force_auth_localhost flag is false. Because client IP resolution trusts same-host reverse proxy TCP peers and unvalidated X-GPUStack-Real-IP headers, remote unauthenticated attackers can bypass authentication, obtain full administrative control, extract sensitive credentials, and achieve remote code execution via the /v2/inference-backends/from-yaml endpoint.
CVE-2026-87008 (GHSA-85gg-2gfq-q95m) is a high-severity symbolic link following and path traversal vulnerability in the `code-graph-rag` Python package prior to version 0.0.589. The flaw resides in the `should_skip_path` path validation routine inside `codebase_rag/utils/path_utils.py`, which performs directory containment checks using unresolved lexical paths rather than canonicalized filesystem paths. Consequently, symbolic links committed to an untrusted repository that point to targets outside the project root bypass boundary enforcement. Attackers who supply a crafted repository containing symbolic links can leverage the `AstGrepService` tool (`structural_search` and `structural_replace`) to read or overwrite arbitrary files on the host filesystem within the privileges of the running process.
FileGator versions prior to 7.15.0 contain a missing authorization check (CWE-862) and predictable identifier generation flaw (CWE-330) in the batch download implementation. When a user initiates a batch download, FileGator generates a temporary ZIP archive identified by PHP's non-cryptographic uniqid() function without binding the resulting identifier to the creating user's session. Consequently, any authenticated user with read, download, and batchdownload permissions who obtains or predicts an active archive identifier can retrieve another user's private files via GET /batchdownload, bypassing per-user home directory isolation and deleting the victim's temporary archive upon download completion.
An authorization bypass and insecure direct object reference (IDOR) vulnerability exists in FileGator versions prior to 7.15.0 within the chunked file upload reassembly handler. When processing multipart uploads in backend/Controllers/UploadController.php, the application fails to namespace the target assembly filename with a user-specific prefix inside the shared temporary storage directory. Authenticated users with upload privileges can manipulate chunk metadata parameters to exfiltrate, corrupt, or delete arbitrary transient files belonging to other users or the system.