One Article Review

Accueil - L'article:
Source CVE.webp CVE Liste
Identifiant 8379822
Date de publication 2023-09-06 18:15:09 (vue: 2023-09-06 21:07:07)
Titre CVE-2023-41330
Texte KNPLABS / KNP-SNAPTY est une bibliothèque PHP permettant une miniature, un instantané ou une génération PDF à partir d'une URL ou d'une page HTML. ## Problème Le 17 mars, la vulnérabilité CVE-2023-28115 a été divulguée, permettant à un attaquant d'obtenir une exécution de code distante par désérialisation du phar.Version 1.4.2 Ajout d'un chèque `if (\ strPos ($ nom de fichier, \\ 'phar: // \') === 0)` dans la fonction `Préparet 'Pour contrôler le deuxième paramètre de la fonction `GenerateFromHtml ()` de Snappy, il sera ensuite passé comme le paramètre `$ filename» dans la fonction `PrepareOutput () '.Dans la vulnérabilité d'origine, un nom de fichier avec une fonction `phar: //` `peut être envoyé à la fonction` fileExists () `, équivalent à la fonction` file_exists () `php.Cela a permis aux utilisateurs de déclencher une désérialisation sur des fichiers phar arbitraires.Pour résoudre ce problème, la chaîne est maintenant transmise à la fonction `strPos ()` et si elle commence par `phar: //`, une exception est élevée.Cependant, les emballages PHP étant insensibles au cas, ce patch peut être contourné en utilisant `phar: //` au lieu de `phar: //`.Une exploitation réussie de cette vulnérabilité permet d'exécuter un code arbitraire et d'accès au système de fichiers sous-jacent.L'attaquant doit être en mesure de télécharger un fichier et le serveur doit exécuter une version PHP avant 8. Ce problème a été abordé dans Commit `D3B742D61A` qui a été inclus dans la version 1.4.3.Il est conseillé aux utilisateurs de mettre à niveau.Les utilisateurs incapables de mettre à niveau doivent s'assurer que seuls les utilisateurs de confiance peuvent soumettre des données à la fonction `AbstractGenerator-> générer (...)`.
knplabs/knp-snappy is a PHP library allowing thumbnail, snapshot or PDF generation from a url or a html page. ## Issue On March 17th the vulnerability CVE-2023-28115 was disclosed, allowing an attacker to gain remote code execution through PHAR deserialization. Version 1.4.2 added a check `if (\strpos($filename, \'phar://\') === 0)` in the `prepareOutput` function to resolve this CVE, however if the user is able to control the second parameter of the `generateFromHtml()` function of Snappy, it will then be passed as the `$filename` parameter in the `prepareOutput()` function. In the original vulnerability, a file name with a `phar://` wrapper could be sent to the `fileExists()` function, equivalent to the `file_exists()` PHP function. This allowed users to trigger a deserialization on arbitrary PHAR files. To fix this issue, the string is now passed to the `strpos()` function and if it starts with `phar://`, an exception is raised. However, PHP wrappers being case insensitive, this patch can be bypassed using `PHAR://` instead of `phar://`. A successful exploitation of this vulnerability allows executing arbitrary code and accessing the underlying filesystem. The attacker must be able to upload a file and the server must be running a PHP version prior to 8. This issue has been addressed in commit `d3b742d61a` which has been included in version 1.4.3. Users are advised to upgrade. Users unable to upgrade should ensure that only trusted users may submit data to the `AbstractGenerator->generate(...)` function.
Envoyé Oui
Condensat $filename 17th 2023 28115 41330 === >generate `$filename` `abstractgenerator `d3b742d61a` `file `fileexists `generatefromhtml `if `phar://` `prepareoutput `prepareoutput` `strpos able accessing added addressed advised allowed allowing allows arbitrary are attacker been being bypassed can case check code commit control could cve data deserialization disclosed ensure equivalent exception executing execution exists exploitation file files filesystem fix from function gain generation has however html included insensitive instead issue knplabs/knp library march may must name now only original page parameter passed patch pdf phar phar:// php prior raised remote resolve running second sent server should snappy snapshot starts string strpos submit successful then through thumbnail trigger trusted unable underlying upgrade upload url user users using version vulnerability which will wrapper wrappers
Tags Vulnerability
Stories
Notes
Move


L'article ne semble pas avoir été repris aprés sa publication.


L'article ne semble pas avoir été repris sur un précédent.
My email: