/

CVE-2026-76635

Severity:

HIGH RISK

(7.2)

SQL Injection (CWE-89) in baserCMS Database Service

CVE-2026-76635

Deferred

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89, CWE-94

Impact:

Database Information Disclosure and Data Manipulation

Severity:

HIGH RISK

(7.2)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

baserCMS before 5.3.0 contains SQL injection weaknesses in database service operations that accept administrator-controlled table names and configuration values. An authenticated administrator, or an attacker who first compromises an administrative workflow, may be able to retrieve database metadata and application data from the PostgreSQL backend.

Affected context

The vulnerability occurs in baserCMS database operations for sequence updates, CSV exports, and table management when user-influenced table names or configuration values are incorporated into SQL statements without adequate parameterization or identifier validation. The risk is greater where authenticated administrators can use backup restoration or schema-loading functionality, because unsafe PHP execution during schema loading may allow database-related values to be planted before the vulnerable operations are triggered.

Exploit preconditions

  • Attack surface: Authenticated baserCMS administrative database, export, and backup-management functionality
  • Required access: Administrator-level access, or another path that permits modification of schema, backup, or configuration inputs
  • Trigger point: Sequence updates, CSV export, or table-management operations that construct SQL using attacker-influenced values
  • Why exploitation is possible: Table identifiers and configuration-derived values can reach SQL statements without sufficient parameterization or allowlisting; unsafe schema loading may also execute PHP code outside class definitions
  • Backend condition: A PostgreSQL database must be reachable through the affected baserCMS deployment for database disclosure effects

Why this happens

The primary flaw is SQL injection, mapped to CWE-89. The application treats attacker-controlled table names or configuration values as trusted SQL components rather than separating data from executable query structure and validating identifiers against an allowed set.

A related weakness maps to CWE-94: Improper Control of Generation of Code, because PHP code placed outside class definitions in restored schema files may execute when those files are loaded. Chaining these behaviors can let an attacker influence values later consumed by unsafe SQL construction.

Potential impact

  • An attacker may retrieve database version information and schema details.
  • Sensitive application or business data could be disclosed from PostgreSQL.
  • Database records or structures could be modified or disrupted.
  • Administrative workflows may be abused to establish persistence or affect application integrity.
  • The code-execution chain could compromise the application process, depending on deployment privileges and execution context.

General mitigation guidance

Mitigation generally focuses on separating SQL structure from data, reducing trust in administrative inputs, and removing executable behavior from restored configuration artifacts.

Common defensive patterns include:

  • Use parameterized queries for values and strict allowlists for dynamic identifiers such as table names.
  • Map approved logical names to fixed database identifiers instead of accepting raw names from requests or configuration.
  • Validate and normalize backup, schema, and export inputs before they are loaded or used in database operations.
  • Use a data-only schema format or restricted parser that cannot execute PHP or instantiate executable behavior.
  • Restrict backup restoration and table-management capabilities to narrowly scoped administrative roles.
  • Run the application database account with only the privileges required for normal operations.
  • Apply database network, filesystem, and secret-access controls to limit consequences of application compromise.

How teams detect issues like this

Organizations commonly look for this class of issue through:

  • Static analysis rules identifying string concatenation or interpolation of request, configuration, or schema values into SQL statements.
  • Code review checks for dynamic table or column identifiers that lack allowlists or controlled mappings.
  • Review of backup and schema loaders for executable statements outside intended declarations.
  • Database monitoring for unusual metadata queries, schema enumeration, unexpected exports, or access to unrelated tables.
  • Administrative audit logging for backup restoration, table management, sequence updates, and CSV export activity.
  • Policy enforcement requiring parameterized database APIs and restricted parsers for configuration and backup formats.

Automated code-scanning and security review tools can help identify unsafe query construction and executable configuration handling.

Sources

SourceLink
github.comgithub.com/baserproject/basercms/releases/tag/5.3.0
github.comgithub.com/baserproject/basercms/security/advisories/GHSA-cg65-f2m7-9fqj
vulncheck.comvulncheck.com/advisories/basercms-sql-injection-and-code-injection-via-bcdatabaseservice-php

Frequently asked

questions

It can be reachable through the baserCMS administrative interface, but exploitation generally requires authenticated administrator access or a separate compromise that permits manipulation of backup, schema, or configuration inputs.

The described SQL injection paths require access to administrative operations that process attacker-controlled table names or configuration values. The chaining scenario additionally depends on the ability to introduce or restore a malicious schema artifact.

Use parameterized queries for data values, allowlist and map dynamic identifiers to fixed names, and ensure restored schema files are parsed as non-executable data rather than loaded as PHP.

Enforce secure database-access patterns in code review and static analysis, restrict administrative privileges, validate backup and configuration inputs, monitor database activity, and apply least privilege to the application's database account.

Find out what's already
exploitable in your codebase.