CVE-2026-142650: Laravel SQL Injection Vulnerability

MODERATE
Advisory Identifier: GHSA-hmj2-jgmw-v4m4
CVSS 5.9
CWE-89
Published
Advisory Summary

CVE-2026-142650 is a MODERATE (CVSS 5.9) sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Laravel libraries in the Packagist ecosystem. The issue involves sql injection in laravel postgresql query grammar. Remediation is available by upgrading affected packages to version 13.24.0, 12.67.0.

CVE-2026-142650 at a Glance

CVE Identifier CVE-2026-142650
GHSA Identifier GHSA-hmj2-jgmw-v4m4
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected Product Laravel
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

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

How to Fix CVE-2026-142650

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

laravel/framework fixed: 13.24.0
Upgrade laravel/framework to 13.24.0
laravel/framework fixed: 12.67.0
Upgrade laravel/framework to 12.67.0
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 laravel/framework

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-142650, inspect your project dependencies for Laravel:

inspect dependencies for laravel/framework

Analyze the terminal output to locate any version of Laravel in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 13.24.0), 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 CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection'), where the product constructs all or part of an sql command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended sql command when it is sent to a downstream component. without sufficient removal or quoting of sql syntax in user-controllable inputs, the generated sql query can cause those inputs to be interpreted as sql instead of ordinary user data. In Laravel, 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

Laravel's PostgreSQL Query Grammar does not escape embedded single quotes in JSON path attributes when compiling non-raw Query Builder APIs. A user-influenced JSON path / identifier segment can break out of the single-quoted SQL string literal context used by PostgreSQL JSON operators. ### Impact This can lead to SQL structure injection and WHERE-condition manipulation when an application passes user-influenced JSON path input into affected Query Builder APIs. ### Patches [#60923](https://github.com/laravel/framework/pull/60923) [#61192](https://github.com/laravel/framework/pull/61192)

CVE-2026-142650 Affected Laravel Versions

2 component(s)
Fixed Versions:
13.24.012.67.0
Product / Package Ecosystem Affected Versions Fixed Version
laravel/framework
Packagist
≥ 13.0.0
< 13.24.0
13.24.0
laravel/framework
Packagist
< 12.67.0
12.67.0

References

Frequently Asked Questions

What is CVE-2026-142650?
CVE-2026-142650 is a security vulnerability in Laravel involving SQL Injection in Laravel PostgreSQL Query Grammar under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection').
Which Laravel versions are affected?
Affected versions include releases prior to 13.24.0, 12.67.0 across affected packages: laravel/framework.
What version fixes CVE-2026-142650?
Upgrading to 13.24.0, 12.67.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is laravel/framework affected?
Yes, laravel/framework is affected in releases prior to 13.24.0, 12.67.0. Upgrade your dependency to 13.24.0, 12.67.0 or later.
What is the CVSS score of CVE-2026-142650?
CVE-2026-142650 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N.
What CWE is associated with CVE-2026-142650?
CVE-2026-142650 is classified under CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') (The product constructs all or part of an SQL command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended SQL command when it is sent to a downstream component. Without sufficient removal or quoting of SQL syntax in user-controllable inputs, the generated SQL query can cause those inputs to be interpreted as SQL instead of ordinary user data.).
How can I check Packagist dependencies for CVE-2026-142650?
Run the dependency tree command: 'inspect dependencies for laravel/framework'. 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-hmj2-jgmw-v4m4",
  "modified" : "2026-12-03T18:19:30Z",
  "published" : "2026-12-03T18:19:30Z",
  "aliases" : [ "CVE-2026-142650" ],
  "summary" : "Laravel: SQL Injection in Laravel PostgreSQL Query Grammar",
  "details" : "Laravel's PostgreSQL Query Grammar does not escape embedded single quotes in JSON path attributes when compiling non-raw Query Builder APIs.\n\nA user-influenced JSON path / identifier segment can break out of the single-quoted SQL string literal context used by PostgreSQL JSON operators. \n\n### Impact\nThis can lead to SQL structure injection and WHERE-condition manipulation when an application passes user-influenced JSON path input into affected Query Builder APIs.\n\n### Patches\n[#60923](https://github.com/laravel/framework/pull/60923) \n[#61192](https://github.com/laravel/framework/pull/61192)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:U/C:H/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "13.0.0"
      }, {
        "fixed" : "13.24.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "laravel/framework"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "12.67.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/security/advisories/GHSA-hmj2-jgmw-v4m4"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-142650"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/pull/60923"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/pull/61192"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/commit/344fcc35a76eb294aeb67ac4b1b9c5b25d2a38f6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/commit/d74baa412fc57ccbd19cfb64ecd33f38c42ee352"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/laravel/framework"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/releases/tag/v12.67.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/laravel/framework/releases/tag/v13.24.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-89" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-12-03T18:19:30Z",
    "nvd_published_at" : "2026-12-03T00:18:07Z"
  }
}