Skip to content
This repository has been archived by the owner on Mar 2, 2019. It is now read-only.

Session Fixation Vulnerability in /admin/loginc.php #24

Open
ghost opened this issue May 10, 2017 · 0 comments
Open

Session Fixation Vulnerability in /admin/loginc.php #24

ghost opened this issue May 10, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented May 10, 2017

/admin/loginc.php

include '../config.php';
if (!session_id()) {
    session_start();
}
$res = $db->select('setting', array('name' => 'admin'));
if ($_POST['password'] == $res[0]['value'] && strtolower($_POST['captcha']) == strtolower($_SESSION['captcha']['code'])) {
    $_SESSION['alogin'] = true;
    header('Location: index.php');
} else {
    header('Location: login.php?err=1');
}

Like Session Fixation Vulnerability in /loginc.php, the system does not regenerate a new session_id after the admin successfully logged in, which could lead to admin account takeover with the help of any XSS vulnerability in the same domain.

s3131212 added a commit that referenced this issue Oct 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants