Login with Administrator and get the cookie of administrator
Capture Packet and Request for an administrator only page.
Accessible- [√ ]
Now login out and delete all the cookie of administrator
Accessible- [× ]
You can see that redirction
But when administrator login again
This cookie can be reuse
Accessible- [√ ]
Packet Info
GET /piwigo/admin.php?page=plugin-LocalFilesEditor HTTP/1.1
Host: 192.168.233.145
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Referer: http://192.168.233.145/piwigo/admin.php?page=plugin-TakeATour
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: pwg_id=8i3dh1pru4mu95g20i6ehajvm3;
Connection: close
Evironment:
Windows XP Professional
Apache
MySQL
PHP 5.4.45
discovered by: topsec(lizhiqiang)
# Steps to reproduce:
1. Login with Administrator and get the cookie of administrator

2. Capture Packet and Request for an administrator only page.
Accessible- [√ ]

3. Now login out and delete all the cookie of administrator
Accessible- [× ]

You can see that redirction
But when administrator login again
This cookie can be reuse

Accessible- [√ ]
4. Packet Info
GET /piwigo/admin.php?page=plugin-LocalFilesEditor HTTP/1.1
Host: 192.168.233.145
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Referer: http://192.168.233.145/piwigo/admin.php?page=plugin-TakeATour
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: pwg_id=8i3dh1pru4mu95g20i6ehajvm3;
Connection: close
# Evironment:
- Windows XP Professional
- Apache
- MySQL
- PHP 5.4.45
discovered by: topsec(lizhiqiang)
<!-- github-sync-id:238194441 -->
It depends on what "3. Login out" means. If it's clicking the logout link in piwigo, we definitely have a bug. (or misconfiguration of the server domain and/or path for setting the cookie versus deleting it).
If the link has not been clicked - no bug, normal behaviour
It depends on what "3. Login out" means. If it's clicking the logout link in piwigo, we definitely have a bug. (or misconfiguration of the server domain and/or path for setting the cookie versus deleting it).
If the link has not been clicked - no bug, normal behaviour
<!-- github-comment-id:311004728 -->
I have just tested. The logout link removes the session data from the database. Even if the cookie is reused, this should recreate a new session data from scratch. (the session data contains login information). So I cannot reproduce...
I have just tested. The logout link removes the session data from the database. Even if the cookie is reused, this should recreate a new session data from scratch. (the session data contains login information). So I cannot reproduce...
<!-- github-comment-id:312252206 -->
I also tested, like @modus75 did and I also see the session being removed.
So I wonder what @Akityo has been able to do with a "deleted session id" :-/ There is no magic here: if the session is deleted on Piwigo side, you won't magically get administrator access by stealing the session id of an administrator that has logged out.
@Akityo can you give more details, by email, not on Github, about the security issue you have found?
I also tested, like @modus75 did and I also see the session being removed.
So I wonder what @Akityo has been able to do with a "deleted session id" :-/ There is no magic here: if the session is deleted on Piwigo side, you won't magically get administrator access by stealing the session id of an administrator that has logged out.
@Akityo can you give more details, by email, not on Github, about the security issue you have found?
<!-- github-comment-id:312261969 -->
@plegall what's your email address. maybe tomorrow i'm back home , send a video to you . @modus75 It make me confuse now , i remamber before post this report ,i had verify this for twice.
@plegall what's your email address. maybe tomorrow i'm back home , send a video to you . @modus75 It make me confuse now , i remamber before post this report ,i had verify this for twice.
<!-- github-comment-id:312280524 -->
@plegall @modus75
em... embarrassing..
I had to apologize for the false positives , my bad..
yes , it can't be reproduce..
@plegall @modus75
em... embarrassing..
I had to apologize for the false positives , my bad..
yes , it can't be reproduce..
<!-- github-comment-id:312438286 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Steps to reproduce:
Accessible- [√ ]
Accessible- [× ]
You can see that redirction
But when administrator login again
This cookie can be reuse
Accessible- [√ ]
GET /piwigo/admin.php?page=plugin-LocalFilesEditor HTTP/1.1
Host: 192.168.233.145
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Referer: http://192.168.233.145/piwigo/admin.php?page=plugin-TakeATour
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: pwg_id=8i3dh1pru4mu95g20i6ehajvm3;
Connection: close
Evironment:
Windows XP Professional
Apache
MySQL
PHP 5.4.45
discovered by: topsec(lizhiqiang)
Thank you @Akityo for this report.
@modus75 does it look like a bug or a security issue to you?
It depends on what "3. Login out" means. If it's clicking the logout link in piwigo, we definitely have a bug. (or misconfiguration of the server domain and/or path for setting the cookie versus deleting it).
If the link has not been clicked - no bug, normal behaviour
@modus75 Hi, i did clicked the logout link in piwigo. you can verify it.
I have just tested. The logout link removes the session data from the database. Even if the cookie is reused, this should recreate a new session data from scratch. (the session data contains login information). So I cannot reproduce...
I also tested, like @modus75 did and I also see the session being removed.
So I wonder what @Akityo has been able to do with a "deleted session id" :-/ There is no magic here: if the session is deleted on Piwigo side, you won't magically get administrator access by stealing the session id of an administrator that has logged out.
@Akityo can you give more details, by email, not on Github, about the security issue you have found?
@plegall what's your email address. maybe tomorrow i'm back home , send a video to you . @modus75 It make me confuse now , i remamber before post this report ,i had verify this for twice.
http://piwigo.org/contact :-)
@plegall @modus75
em... embarrassing..
I had to apologize for the false positives , my bad..
yes , it can't be reproduce..
Fine, I close the issue then. Please next time, send an email about security issues :-)
CVE-2017-9837 was previously assigned for this issue (not requested by me). I'll ask it to be rejected.