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

Injection SQL sur le cookie user_id #51

Closed
h4knet opened this issue Feb 26, 2020 · 1 comment
Closed

Injection SQL sur le cookie user_id #51

h4knet opened this issue Feb 26, 2020 · 1 comment
Assignees
Labels

Comments

@h4knet
Copy link

h4knet commented Feb 26, 2020

Bonjour,

Il est possible de réaliser une injection SQL sur le cookie user_id. Il a été observé que cette injection est possible sur les pages index.php, login.php et logout.php sans authentification préalable.

Exemple d'injection de code utilisant la fonction sleep(3):
Cookie: user_id=1' union select sleep(3) -- ;

L'exploitation d'une telle injection SQL peut permettre à un attaquant d'obtenir des accès administrateurs sur l'application (récupération de session_id admin, dump de table users).

Ceci a été testé sur une installation de EON 5.1 et 5.3 téléchargée à partir du site officiel (la 5.2 doit probablement aussi être vulnérable).

Le fichier source permettant l’injection SQL est eonweb/include/classes/Translator.class.php au morceau de code suivant :

// Check if user default lang is defined
if(isset($_COOKIE['user_id'])){
		$lang = mysqli_result(sqlrequest($database_eonweb,"select user_language from users where user_id='".$_COOKIE['user_id']."'"),0);
}
@davoult davoult self-assigned this Feb 27, 2020
CDavidLT pushed a commit that referenced this issue Feb 27, 2020
davoult added a commit that referenced this issue Feb 28, 2020
@davoult davoult added the bug label Feb 28, 2020
@davoult
Copy link
Contributor

davoult commented Feb 28, 2020

Encore une fois merci @h4knet pour cette remontée de vulnérabilité.
Le correctif a été publié dans eonweb-5.3-3.x86_64.rpm.

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

No branches or pull requests

2 participants