VYPR
High severityNVD Advisory· Published Mar 16, 2023· Updated Feb 25, 2025

Pimcore has improper quoting of columns when calling methods "getByUuid" & "exists" on UUID Model

CVE-2023-28108

Description

Pimcore is an open source data and experience management platform. Prior to version 10.5.19, quoting is not done properly in UUID DAO model. There is the theoretical possibility to inject custom SQL if the developer is using this methods with input data and not doing proper input validation in advance and so relies on the auto-quoting being done by the DAO class. Users should update to version 10.5.19 to receive a patch or, as a workaround, apply the patch manually.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
pimcore/pimcorePackagist
< 10.5.1910.5.19

Affected products

1

Patches

1
08e7ba56ae98

[Task] Optimized get by UUID (#14633)

https://github.com/pimcore/pimcorelukmzigMar 15, 2023via ghsa
1 file changed · +25 2
  • models/Tool/UUID/Dao.php+25 2 modified
    @@ -15,6 +15,7 @@
     
     namespace Pimcore\Model\Tool\UUID;
     
    +use Doctrine\DBAL\Types\Types;
     use Pimcore\Db\Helper;
     use Pimcore\Model;
     
    @@ -80,7 +81,17 @@ public function delete()
          */
         public function getByUuid($uuid)
         {
    -        $data = $this->db->fetchAssociative('SELECT * FROM ' . self::TABLE_NAME ." where uuid='" . $uuid . "'");
    +        $queryBuilder = $this->db->createQueryBuilder();
    +        $queryBuilder
    +            ->select('*')
    +            ->from(self::TABLE_NAME)
    +            ->where('uuid = :uuid')
    +            ->setParameter('uuid', $uuid, Types::STRING);
    +
    +        $data = $queryBuilder
    +            ->execute()
    +            ->fetchAssociative();
    +
             $model = new Model\Tool\UUID();
             $model->setValues($data);
     
    @@ -94,6 +105,18 @@ public function getByUuid($uuid)
          */
         public function exists($uuid)
         {
    -        return (bool) $this->db->fetchOne('SELECT uuid FROM ' . self::TABLE_NAME . ' where uuid = ?', [$uuid]);
    +        $queryBuilder = $this->db->createQueryBuilder();
    +        $queryBuilder
    +            ->select('uuid')
    +            ->from(self::TABLE_NAME)
    +            ->where('uuid = :uuid')
    +            ->setParameter('uuid', $uuid, Types::STRING);
    +
    +
    +        $result = $queryBuilder
    +            ->execute()
    +            ->fetchOne();
    +
    +        return (bool) $result;
         }
     }
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

5

News mentions

0

No linked articles in our index yet.