The Silent Threat: RLS Left Off By Default

While the tech world obsitates over sophisticated encryption algorithms and zero-trust architectures, a far more fundamental security lapse is quietly causing widespread data breaches. The culprit? Row Level Security (RLS) policies, or more accurately, the absence of them. Research indicates that in 2026, the single most common way production databases are compromised is not through advanced exploits, but by simply failing to enable RLS on critical tables. This oversight, often born from developer oversight or a misunderstanding of database security defaults, leaves sensitive data exposed to unauthorized access, leading to exfiltrations and significant reputational damage.

The problem is pervasive. Developers, focused on rapid feature development and the complexities of AI model integration, frequently overlook or postpone the implementation of RLS. This is particularly true when working with modern, cloud-native databases and backend-as-a-service platforms that abstract away some of the traditional database administration tasks. While these tools offer immense productivity gains, they can also mask critical security configurations. The result is a landscape where applications, including those handling sensitive AI training data or user information, are unknowingly operating with wide-open database access.

A Pattern of Exposure: Real-World Incidents

The consequences of neglecting RLS are not theoretical. Several high-profile incidents in 2025 and 2026 have underscored the severity of this vulnerability. One notable case, documented under CVE-2025-48757 in May 2025, affected Lovable, a popular AI app-building tool. This vulnerability revealed that 303 endpoints across 170 applications built using Lovable had Supabase tables that were publicly readable. The critical detail here is not misconfiguration, but that RLS was never enabled in the first place. This suggests a systemic issue within the platform or its user base, where the default state for new tables was insecure.

The implications are staggering. Imagine building an entire ecosystem of AI applications, each handling user data, only to discover that the underlying database tables are exposed by default. This isn't a hypothetical scenario; it's a documented reality that has allowed attackers to gain broad access to sensitive information. The ease with which this access can be achieved makes it a prime target for opportunistic attackers and sophisticated threat actors alike.

Diagram illustrating the flow of data access with and without Row Level Security enabled.

Another incident in March 2026 involved a significant data exfiltration from the database of a prominent AI platform. While the full technical details remain under wraps, initial reports indicate that the breach occurred because critical user and model data tables lacked RLS policies. Attackers were able to exploit this absence to access and download vast amounts of proprietary information. This event serves as a stark reminder that even established platforms are not immune to basic security oversights.

Why RLS is Crucial for Modern Applications

Row Level Security is a database feature that enforces restrictions on which rows a user can access and modify within a table. Instead of granting broad table-level permissions, RLS allows administrators to define granular policies based on user roles, session variables, or other contextual information. For example, a policy could ensure that a user can only view or edit records associated with their own account or department.

In the context of AI platforms, RLS is particularly vital. These applications often handle:

  • User Data: Personal information, preferences, and activity logs must be kept private.
  • Model Training Data: Proprietary datasets used for training AI models represent significant intellectual property and competitive advantage. Unauthorized access can lead to theft or manipulation.
  • Inference Results: Sensitive outputs from AI models, which might contain confidential business insights or personal information.
  • Configuration and Metadata: Internal settings and operational data that could reveal system vulnerabilities.

Without RLS, any authenticated user with access to the database could potentially see all data in a table. This is akin to giving everyone a master key to a building, rather than individual keys to specific rooms they are authorized to enter. The risk escalates dramatically when developers rely on application-level logic to enforce security, which is often more complex to implement correctly and harder to audit than database-native RLS policies.

The Developer Oversight Trap

The primary reason for the widespread lack of RLS implementation appears to be a combination of factors:

  • Default Settings: Many modern database services and ORMs (Object-Relational Mappers) do not enable RLS by default. Users must explicitly opt-in, a step that is easily missed during initial setup or development.
  • Complexity Perception: Some developers perceive RLS policies as complex to write and manage, especially for intricate access control requirements. This leads to a decision to postpone implementation until “later,” a later that often never arrives.
  • Focus on Application Logic: There's a tendency to assume that securing data at the application layer is sufficient. However, direct database access, whether intentional or accidental, bypasses these controls entirely.
  • Lack of Awareness: A general lack of awareness about the prevalence and impact of RLS vulnerabilities among development teams.

The migration from Firestore Security Rules to Postgres RLS, as mentioned in initial research, highlights this disconnect. While the goal is to translate existing security logic, the process often reveals that the original security posture was less robust than assumed, or that the equivalent RLS policies were never implemented in the new system. This transition period is a critical juncture where security can be inadvertently weakened.

What Nobody Has Addressed Yet: The Ecosystem Impact

What nobody has fully addressed yet is the cascading effect of these RLS failures on the broader AI ecosystem. If foundational AI platforms or development tools have inherent RLS vulnerabilities, it means that every application built on top of them inherits that risk. This creates a massive attack surface that is incredibly difficult to patch retrospectively. Developers might assume their application’s security is sound, only to discover their data is compromised because a third-party service they rely on failed to implement basic RLS. This necessitates a shift in how we think about supply chain security, extending it beyond code libraries to include infrastructure and data access configurations.

Mitigation and Best Practices

Addressing the missing RLS threat requires a multi-faceted approach:

  • Enable RLS by Default: Database providers and platform vendors should strongly consider enabling RLS by default for all new tables, or at least provide prominent, unmissable warnings during setup.
  • Developer Education: Security awareness training for developers must include comprehensive modules on RLS, its importance, and practical implementation.
  • Automated Auditing: Implement automated tools that regularly scan databases to verify RLS policies are in place and correctly configured for critical tables.
  • Security Reviews: Integrate RLS checks into code reviews and security audits for all applications handling sensitive data.
  • Principle of Least Privilege: Always apply the principle of least privilege, ensuring users and applications only have access to the data they absolutely need.

The ease with which RLS can be bypassed makes it a critical vulnerability. As AI systems become more integrated into every facet of business and life, the data they process becomes more valuable and sensitive. Failing to secure this data at the database level through robust RLS policies is an invitation to disaster. The breaches of 2025 and 2026 are not anomalies; they are clear signals that a fundamental aspect of database security is being ignored, with potentially devastating consequences for organizations worldwide.