Skip to main content

CVE-2022-29240: CWE-908: Use of Uninitialized Resource in scylladb scylla

Medium
Published: Thu Sep 15 2022 (09/15/2022, 21:20:11 UTC)
Source: CVE
Vendor/Project: scylladb
Product: scylla

Description

Scylla is a real-time big data database that is API-compatible with Apache Cassandra and Amazon DynamoDB. When decompressing CQL frame received from user, Scylla assumes that user-provided uncompressed length is correct. If user provides fake length, that is greater than the real one, part of decompression buffer won't be overwritten, and will be left uninitialized. This can be exploited in several ways, depending on the privileges of the user. 1. The main exploit is that an attacker with access to CQL port, but no user account, can bypass authentication, but only if there are other legitimate clients making connections to the cluster, and they use LZ4. 2. Attacker that already has a user account on the cluster can read parts of uninitialized memory, which can contain things like passwords of other users or fragments of other queries / results, which leads to authorization bypass and sensitive information disclosure. The bug has been patched in the following versions: Scylla Enterprise: 2020.1.14, 2021.1.12, 2022.1.0. Scylla Open Source: 4.6.7, 5.0.3. Users unable to upgrade should make sure none of their drivers connect to cluster using LZ4 compression, and that Scylla CQL port is behind firewall. Additionally make sure no untrusted client can connect to Scylla, by setting up authentication and applying workarounds from previous point (firewall, no lz4 compression).

AI-Powered Analysis

AILast updated: 06/22/2025, 22:51:18 UTC

Technical Analysis

CVE-2022-29240 is a vulnerability in ScyllaDB, a high-performance, real-time big data database that is API-compatible with Apache Cassandra and Amazon DynamoDB. The flaw arises during the decompression of CQL frames received from users. Specifically, Scylla assumes that the user-provided uncompressed length is accurate. If an attacker supplies a falsified length that exceeds the actual decompressed data size, part of the decompression buffer remains uninitialized. This uninitialized memory can contain residual data from previous operations, leading to potential information leakage or unauthorized access. The exploitation scenarios vary based on the attacker's privileges. Firstly, an unauthenticated attacker with network access to the CQL port can bypass authentication under certain conditions: if other legitimate clients are connected and using LZ4 compression, the attacker can exploit the uninitialized buffer to gain unauthorized access. Secondly, an attacker with valid user credentials can read uninitialized memory segments, potentially exposing sensitive information such as other users' passwords or fragments of queries and results. This can lead to privilege escalation and data disclosure. The vulnerability affects Scylla Enterprise versions prior to 2020.1.14, 2021.1.12, and 2022.1.0, and Scylla Open Source versions below 4.6.7 and between 5.0.0 and 5.0.3. The issue has been patched in these versions. For users unable to upgrade immediately, recommended mitigations include disabling LZ4 compression on client drivers, restricting access to the Scylla CQL port via firewall rules, enforcing authentication, and ensuring that no untrusted clients can connect to the cluster. This vulnerability is classified under CWE-908 (Use of Uninitialized Resource), indicating a failure to properly initialize memory before use, which can lead to unpredictable behavior and security risks. There are no known exploits in the wild at this time, but the potential for both authentication bypass and sensitive data exposure makes this a significant concern for environments using vulnerable Scylla versions.

Potential Impact

For European organizations, the impact of CVE-2022-29240 can be substantial, especially for those relying on ScyllaDB for critical data storage and real-time analytics. The vulnerability enables attackers to bypass authentication if certain conditions are met, potentially allowing unauthorized access to sensitive databases. This can lead to data breaches involving personal data, intellectual property, or operational data, which may violate GDPR and other data protection regulations, resulting in legal and financial penalties. Moreover, the ability for authenticated users to read uninitialized memory can expose confidential information such as passwords and query data, increasing the risk of lateral movement within the network and further compromise. Organizations in sectors like finance, healthcare, telecommunications, and government, which often handle sensitive or regulated data, are particularly at risk. The requirement for network access to the CQL port and the presence of legitimate clients using LZ4 compression somewhat limits the attack surface but does not eliminate it. Given that ScyllaDB is used in high-performance and scalable environments, a successful exploit could disrupt availability and integrity of data services, impacting business continuity and trust.

Mitigation Recommendations

1. Upgrade ScyllaDB to the patched versions: Scylla Enterprise 2020.1.14, 2021.1.12, 2022.1.0 or Scylla Open Source 4.6.7 and 5.0.3 or later. 2. If immediate upgrade is not feasible, disable LZ4 compression on all client drivers connecting to the Scylla cluster to prevent exploitation via manipulated decompression lengths. 3. Restrict network access to the Scylla CQL port using strict firewall rules, allowing connections only from trusted hosts and networks. 4. Enforce strong authentication mechanisms to ensure no untrusted clients can connect to the database cluster. 5. Monitor network traffic and logs for unusual connection attempts or anomalies on the CQL port, especially from unauthenticated sources. 6. Conduct regular security audits and penetration tests focusing on database access controls and compression settings. 7. Educate database administrators and security teams about this vulnerability and ensure timely patch management processes are in place. 8. Consider implementing network segmentation to isolate database clusters from general user networks, reducing exposure. These measures go beyond generic advice by focusing on compression settings, network-level controls, and operational practices specific to ScyllaDB environments.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
GitHub_M
Date Reserved
2022-04-13T00:00:00.000Z
Cisa Enriched
true

Threat ID: 682d9844c4522896dcbf3cce

Added to database: 5/21/2025, 9:09:24 AM

Last enriched: 6/22/2025, 10:51:18 PM

Last updated: 8/8/2025, 2:48:37 PM

Views: 12

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats