Security
Headlines
HeadlinesLatestCVEs

Headline

CVE-2022-36749: šŸ› | Command Injection and XSS vulnerabilities reports Ā· Issue #1859 Ā· MiczFlor/RPi-Jukebox-RFID

RPi-Jukebox-RFID v2.3.0 was discovered to contain a command injection vulnerability via the component /htdocs/utils/Files.php. This vulnerability is exploited via a crafted payload injected into the file name of an uploaded file.

CVE
#xss#vulnerability#php

I would like to report for possible vulnerability.

//line 136 if(isset($_GET[ā€˜folderā€™]) && $_GET[ā€˜folderā€™] != ā€œā€) { $post[ā€˜folderā€™] = $_GET[ā€˜folderā€™]; } else { if(isset($_POST[ā€˜folderā€™]) && $_POST[ā€˜folderā€™] != ā€œā€) { $post[ā€˜folderā€™] = $_POST[ā€˜folderā€™]; } } if(isset($_GET[ā€˜filenameā€™]) && $_GET[ā€˜filenameā€™] != ā€œā€) { $post[ā€˜filenameā€™] = $_GET[ā€˜filenameā€™]; } else { if(isset($_POST[ā€˜filenameā€™]) && $_POST[ā€˜filenameā€™] != ā€œā€) { $post[ā€˜filenameā€™] = $_POST[ā€˜filenameā€™]; } } //line 249 $fileName = Files::buildPath($post[ā€˜folderā€™], $post[ā€˜filenameā€™]); $exec = ā€œmid3v2 -l 'ā€ .$fileName ."ā€™" ;

public static function buildPath(ā€¦$pieces) { return implode(DIRECTORY_SEPARATOR, $pieces); }

So the attacker can control the command injection through the filename.
The attacker can add ā€˜;ā€™ and add another command like (echo <script>alert(document.cookie)<\script>.
The output pf the command will be printed through this path.

//line 252 // note: the output of the command is in $res $lines = explode(PHP_EOL, $res); foreach($lines as $line) { $parts = explode("=",$line); $key = trim(array_shift($parts)); // take the first $val = trim(implode("=",$parts)); // put the rest back together if (in_array($key, $trackDat[ā€˜metaKeysā€™][ā€˜mp3ā€™])) { $trackDat[ā€˜existingTagsā€™][$key] = $val; } } //line 496 if (isset($trackDat[ā€˜existingTagsā€™][ā€˜TCOMā€™]) && trim($trackDat[ā€˜existingTagsā€™][ā€˜TCOMā€™]) != ā€œā€) { echo trim($trackDat[ā€˜existingTagsā€™][ā€˜TCOMā€™]); }

Finally, I recommend using escapeshellarg function with the $_GET[ā€˜folderā€™], $_POST[ā€˜folderā€™], $_GET[ā€˜filenameā€™] and $_POST[ā€˜filenameā€™]

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