CVE-2013-4662: Civicrm/civicrm core SQL Injection Vulnerability
MODERATECVE-2013-4662 is a MODERATE sql injection vulnerability (CWE-89: Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')) affecting Civicrm/civicrm core libraries in the Packagist ecosystem. The issue involves civicrm sql injection vulnerability via quick search api. Remediation is available by upgrading affected packages to version 4.2.9, 4.3.3.
CVE-2013-4662 at a Glance
How to Fix CVE-2013-4662
To remediate this vulnerability, upgrade all affected Civicrm/civicrm core 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 civicrm/civicrm-core to 4.2.9
Upgrade civicrm/civicrm-core to 4.3.3
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for civicrm/civicrm-core
How to Check if You Are Affected
To determine whether your application is affected by CVE-2013-4662, inspect your project dependencies for Civicrm/civicrm core:
inspect dependencies for civicrm/civicrm-core
Analyze the terminal output to locate any version of Civicrm/civicrm core in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.9), 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 Civicrm/civicrm core, 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-2013-4662 Affected Civicrm/civicrm core Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
civicrm/civicrm-core
|
Packagist |
≥ 4.2.0
< 4.2.9
|
4.2.9
|
|
civicrm/civicrm-core
|
Packagist |
≥ 4.3.0
< 4.3.3
|
4.3.3
|
References
Frequently Asked Questions
What is CVE-2013-4662?
Which Civicrm/civicrm core versions are affected?
What version fixes CVE-2013-4662?
Is civicrm/civicrm-core affected?
What CWE is associated with CVE-2013-4662?
How can I check Packagist dependencies for CVE-2013-4662?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4465-r2hg-v4rj",
"modified" : "2023-08-29T18:45:53Z",
"published" : "2022-05-17T04:52:06Z",
"aliases" : [ "CVE-2013-4662" ],
"summary" : "CiviCRM SQL injection vulnerability via Quick Search API",
"details" : "The Quick Search API in CiviCRM 4.2.0 through 4.2.9 and 4.3.0 through 4.3.3 allows remote authenticated users to bypass the validation layer and conduct SQL injection attacks via a direct request to the \"second layer\" of the API, related to contact.getquick.",
"severity" : [ ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "civicrm/civicrm-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.2.0"
}, {
"fixed" : "4.2.9"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "civicrm/civicrm-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.3.0"
}, {
"fixed" : "4.3.3"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2013-4662"
}, {
"type" : "WEB",
"url" : "https://civicrm.org/advisory/civi-sa-2013-004-limited-sql-injection-quick-search-api"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/civicrm/civicrm-core"
}, {
"type" : "WEB",
"url" : "https://issues.civicrm.org/jira/browse/CRM-12765"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-89" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-29T18:45:53Z",
"nvd_published_at" : "2014-01-29T18:55:00Z"
}
}