Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-23937: [Task]: Mime type check on Profile Avatar upload (#14125) · pimcore/pimcore@75a448e

Pimcore is an Open Source Data & Experience Management Platform: PIM, MDM, CDP, DAM, DXP/CMS & Digital Commerce. The upload functionality for updating user profile does not properly validate the file content-type, allowing any authenticated user to bypass this security check by adding a valid signature (p.e. GIF89) and sending any invalid content-type. This could allow an authenticated attacker to upload HTML files with JS content that will be executed in the context of the domain. This issue has been patched in version 10.5.16.

CVE
#google#js#git#perl#auth#chrome

@@ -21,12 +21,14 @@ use Pimcore\Bundle\AdminBundle\HttpFoundation\JsonResponse; use Pimcore\Controller\KernelControllerEventInterface; use Pimcore\Logger; use Pimcore\Model\Asset; use Pimcore\Model\DataObject; use Pimcore\Model\Element; use Pimcore\Model\User; use Pimcore\Tool; use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface; use Symfony\Component\HttpFoundation\BinaryFileResponse; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface; @@ -797,6 +799,15 @@ public function uploadImageAction(Request $request) throw $this->createAccessDeniedHttpException(‘Only admin users are allowed to modify admin users’); }
//Check if uploaded file is an image $avatarFile = $request->files->get(‘Filedata’);
$assetType = Asset::getTypeFromMimeMapping($avatarFile->getMimeType(), $avatarFile);
if (!$avatarFile instanceof UploadedFile || $assetType !== ‘image’) { throw new \Exception(‘Unsupported file format.’); }
$userObj->setImage($_FILES[‘Filedata’][‘tmp_name’]);
// set content-type to text/html, otherwise (when application/json is sent) chrome will complain in

Related news

GHSA-8xv4-jj4h-qww6: Pimcore contains Unrestricted Upload of File with Dangerous Type

### Impact The upload functionality for updating user profile does not properly validate the file content-type, allowing any authenticated user to bypass this security check by adding a valid signature (p.e. GIF89) and sending any invalid content-type. This could allow an authenticated attacker to upload HTML files with JS content that will be executed in the context of the domain. ### Patches Update to version 10.5.16 or apply this patch manually https://github.com/pimcore/pimcore/pull/14125.patch

CVE: Latest News

CVE-2023-50976: Transactions API Authorization by oleiman · Pull Request #14969 · redpanda-data/redpanda
CVE-2023-6905
CVE-2023-6903
CVE-2023-6904
CVE-2023-3907