Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2023-2753: fix: remove HTML event attributes · thorsten/phpMyFAQ@5401ab7

Cross-site Scripting (XSS) - Stored in GitHub repository thorsten/phpmyfaq prior to 3.2.0-beta.

CVE
#xss#git#php#xpath

Expand Up

@@ -18,6 +18,7 @@

namespace phpMyFAQ\Helper;

use DOMDocument;

use DOMXPath;

use Exception;

use ParsedownExtra;

use phpMyFAQ\Category;

Expand Down Expand Up

@@ -245,6 +246,14 @@ public function cleanUpContent(string $content): string

$scriptTags->item($i)->parentNode->removeChild($scriptTags->item($i));

}

return preg_replace(['/\r/’, ‘/\n/’], '’, $document->saveHTML());

$xpath = new DOMXPath($document);

$onAttributes = $xpath->query("//*/@*[starts-with(name(), ‘on’)]");

foreach ($onAttributes as $onAttribute) {

$onAttribute->ownerElement->removeAttributeNode($onAttribute);

}

$body = $xpath->query(‘body’)->item(0);

return preg_replace(['/\r/’, ‘/\n/’], '’, $document->saveHTML($body));

}

}

Related news

GHSA-vppq-6ff8-2m8w: phpMyFAQ vulnerable to stored Cross-site Scripting

Cross-site Scripting (XSS) - Stored in GitHub repository thorsten/phpmyfaq prior to 3.2.0-beta.

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