CVE-2023-5311
Note : A JOURNEY TO GAIN KNOWLEDGE
Description
Analysis
if (!empty($_POST['save_root'])) {
if (isset($_POST['wp_extra']['htaccess_root'])) {
$htaccess_root = trim(stripslashes($_POST['wp_extra']['htaccess_root']));
if ($htaccess_root) {
@file_put_contents($path_root, $htaccess_root);
} if (!empty($_POST['save_content'])) {
if (isset($_POST['wp_extra']['htaccess_content'])) {
$htaccess_content = trim(stripslashes($_POST['wp_extra']['htaccess_content']));
if ($htaccess_content) {
if (!file_exists($path_content)) {
@file_put_contents($path_content, $htaccess_content);
}
} else {
unlink($path_content);
}
}
}POC

Last updated