CVE-2025-25226: Joomla/database SQL Injection Vulnerability
MODERATECVE-2025-25226 is a MODERATE sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Joomla/database libraries in the Packagist ecosystem. The issue involves joomla framework database package vulnerable to sql injection. Remediation is available by upgrading affected packages to version 3.4.0, 2.2.0.
CVE-2025-25226 at a Glance
How to Fix CVE-2025-25226
To remediate this vulnerability, upgrade all affected Joomla/database dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade joomla/database to 3.4.0
Upgrade joomla/database to 2.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for joomla/database
How to Check if You Are Affected
To determine whether your application is affected by CVE-2025-25226, inspect your project dependencies for Joomla/database:
inspect dependencies for joomla/database
Analyze the terminal output to locate any version of Joomla/database in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.4.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 Joomla/database, 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
CVE-2025-25226 Affected Joomla/database Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
joomla/database
|
Packagist |
≥ 3.0.0
< 3.4.0
|
3.4.0
|
|
joomla/database
|
Packagist |
≥ 1.0.0
< 2.2.0
|
2.2.0
|
References
Frequently Asked Questions
What is CVE-2025-25226?
Which Joomla/database versions are affected?
What version fixes CVE-2025-25226?
Is joomla/database affected?
What CWE is associated with CVE-2025-25226?
How can I check Packagist dependencies for CVE-2025-25226?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-44v2-prcf-pc3m",
"modified" : "2025-04-09T13:08:26Z",
"published" : "2025-04-08T18:34:43Z",
"aliases" : [ "CVE-2025-25226" ],
"summary" : "Joomla Framework Database Package Vulnerable to SQL Injection",
"details" : "Improper handling of identifiers lead to a SQL injection vulnerability in the quoteNameStr method of the database package. Please note: the affected method is a protected method. It has no usages in the original packages in neither the 2.x nor 3.x branch and therefore the vulnerability in question can not be exploited when using the original database class. However, classes extending the affected class might be affected, if the vulnerable method is used.",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "joomla/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "3.0.0"
}, {
"fixed" : "3.4.0"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "joomla/database"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.0.0"
}, {
"fixed" : "2.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-25226"
}, {
"type" : "WEB",
"url" : "https://developer.joomla.org/security-centre/963-20250401-framework-sql-injection-vulnerability-in-quotenamestr-method-of-database-package.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/joomla-framework/database"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2025-04-09T13:08:26Z",
"nvd_published_at" : "2025-04-08T17:15:35Z"
}
}