GHSA-76w8-mqx4-wjrf: Doctrine/dbal SQL Injection Vulnerability

HIGH
CVSS 8.1
Published
Advisory Summary

GHSA-76w8-mqx4-wjrf is a HIGH (CVSS 8.1) sql injection vulnerability (General Security Weakness) affecting Doctrine/dbal libraries in the Packagist ecosystem. The issue involves doctrine dbal sql injection possibility. Remediation is available by upgrading affected packages to version 2.0.8, 2.1.2.

GHSA-76w8-mqx4-wjrf at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-76w8-mqx4-wjrf
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification General Security Weakness
Affected Product Doctrine/dbal
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix GHSA-76w8-mqx4-wjrf

To remediate this vulnerability, upgrade all affected Doctrine/dbal dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

doctrine/dbal fixed: 2.0.8
Upgrade doctrine/dbal to 2.0.8
doctrine/dbal fixed: 2.1.2
Upgrade doctrine/dbal to 2.1.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for doctrine/dbal

How to Check if You Are Affected

To determine whether your application is affected by GHSA-76w8-mqx4-wjrf, inspect your project dependencies for Doctrine/dbal:

inspect dependencies for doctrine/dbal

Analyze the terminal output to locate any version of Doctrine/dbal in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.8), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under General Security Weakness. In Doctrine/dbal, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

The identifier quoting in Doctrine DBAL has a potential security problem when user-input is passed into this function, making the security aspect of this functionality obsolete. If you make use of AbstractPlatform::quoteIdentifier() or Doctrine::quoteIdentifier() please upgrade immediately. The ORM itself does not use identifier quoting in combination with user-input, however we still urge everyone to update to the latest version of DBAL.

GHSA-76w8-mqx4-wjrf Affected Doctrine/dbal Versions

2 component(s)
Fixed Versions:
2.0.82.1.2
Product / Package Ecosystem Affected Versions Fixed Version
doctrine/dbal
Packagist
≥ 2.0.0
< 2.0.8
2.0.8
doctrine/dbal
Packagist
≥ 2.1.0
< 2.1.2
2.1.2

References

Frequently Asked Questions

What is GHSA-76w8-mqx4-wjrf?
GHSA-76w8-mqx4-wjrf is a security vulnerability in Doctrine/dbal involving Doctrine DBAL SQL injection possibility under General Security Weakness.
Which Doctrine/dbal versions are affected?
Affected versions include releases prior to 2.0.8, 2.1.2 across affected packages: doctrine/dbal.
What version fixes GHSA-76w8-mqx4-wjrf?
Upgrading to 2.0.8, 2.1.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is doctrine/dbal affected?
Yes, doctrine/dbal is affected in releases prior to 2.0.8, 2.1.2. Upgrade your dependency to 2.0.8, 2.1.2 or later.
What is the CVSS score of GHSA-76w8-mqx4-wjrf?
GHSA-76w8-mqx4-wjrf has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L.
What CWE is associated with GHSA-76w8-mqx4-wjrf?
GHSA-76w8-mqx4-wjrf is classified under General Security Weakness.
How can I check Packagist dependencies for GHSA-76w8-mqx4-wjrf?
Run the dependency tree command: 'inspect dependencies for doctrine/dbal'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-76w8-mqx4-wjrf",
  "modified" : "2024-05-15T18:42:20Z",
  "published" : "2024-05-15T18:42:20Z",
  "aliases" : [ ],
  "summary" : "Doctrine DBAL SQL injection possibility",
  "details" : "The identifier quoting in Doctrine DBAL has a potential security problem when user-input is passed into this function, making the security aspect of this functionality obsolete.\nIf you make use of AbstractPlatform::quoteIdentifier() or Doctrine::quoteIdentifier() please upgrade immediately. The ORM itself does not use identifier quoting in combination with user-input, however we still urge everyone to update to the latest version of DBAL.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:L/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "doctrine/dbal"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "doctrine/dbal"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/doctrine/dbal/2011-09-25.yaml"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/doctrine/dbal"
  }, {
    "type" : "WEB",
    "url" : "https://web.archive.org/web/20130208100252/https://www.doctrine-project.org/blog/dbal-security-2011-1.html"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-05-15T18:42:20Z",
    "nvd_published_at" : null
  }
}