Concrete5 <= SQL Injection

Tested Versions:

Concrete5 version

Minded Security ReferenceID:





Discovered by
Egidio Romano of Minded Security
egidio.romano [_at_]




Update to version or later.

Other references:


Minded Security Consultants discovered during a Secure Code Review activity that Concrete5 <= is vulnerable to a SQL Injection.


The vulnerable code is located within the Access::buildAssignmentFilterString() method, which uses its $accessType parameter to construct a SQL query without a proper validation:

File: /concrete/src/Permission/Access/Access.php (lines 168-183):

protected function buildAssignmentFilterString($accessType, $filterEntities)
$peIDs = '';
$filters = array();
if (count($filterEntities) > 0) {
foreach ($filterEntities as $ent) {
$filters[] = $ent->getAccessEntityID();
$peIDs .= 'and peID in (' . implode($filters, ',') . ')';
if ($accessType == 0) {
$accessType = '';
} else {
$accessType = ' and accessType = ' . $accessType;
return $peIDs . ' ' . $accessType . ' order by accessType desc'; // we order desc
so that excludes come last (-1)


This method is being called by the Access::getAccessListItems(), and this one is called by the following script passing input coming from the “listItem” request parameter as the $accessType parameter to that method:

File: /concrete/tools/permissions/categories/page.php (lines 192-212):

if ($_REQUEST['task'] == 'bulk_remove_access' && Loader::helper('validation/token')-
>validate('bulk_remove_access')) {
$pkID = $_REQUEST['pkID'];
$pk = PermissionKey::getByID($pkID);
$u = new User();
$deferred = false;
foreach($pages as $c) {
$pa = $pk->getPermissionAccessObject();
$matches = array();
if (is_object($pa)) {
foreach($_REQUEST['listItem'] as $li) {
$lii = explode(':', $li);
$peID = $lii[0];
$accessType = $lii[1];
$pdID = $lii[2];
$listItems = $pa->getAccessListItems($accessType);


When the “task” request parameter is set to “bulk_remove_access”, input coming from the “listItem” request parameter is passed directly to the Access::getAccessListItems() method without a proper validation. This can be exploited to inject and execute arbitrary SQL commands.

Disclosure Timeline

[05/05/2015] – Vulnerability details sent through HackerOne
[05/08/2015] – Vendor said a patch has been committed and will be available in the next version
[05/12/2015] – Version released along with the patch for this vulnerability
[06/11/2015] – Vulnerability publicly disclosed on HackerOne
[06/11/2015] – CVE number requested
[06/23/2015] – CVE number assigned


The information within this paper may change without notice. Use of this information constitutes acceptance for use in an AS IS condition. There are NO warranties with regard to this information.

In no event shall the author be liable for any damages whatsoever arising out of or in connection with the use or spread of this information.

Any use of this information is at the user’s own risk. Permission is hereby granted for the redistribution of this Alert electronically. It is not to be edited in any way without express consent of Minded Security Research Lab. If you wish to reprint the whole or any part of this Alert in any other medium excluding electronic medium, please e-mail for permission.


Implement the right DevSecOps automation and Continuous Web Application Scanning for your needs.

consulting minded security


We are a Consultancy Company focused in supporting Companies to develop secure products.

testing minded security


We performs software security analysis in white box mode and black box mode.

training minded security


Training and awareness in software security is critical for information security.