[ZBX-7693] User type "Zabbix Admin" users can modify the media for all Zabbix users - Security hole Created: 2014 Jan 23 Updated: 2020 Jul 16 Resolved: 2014 Feb 06 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.2.1 |
Fix Version/s: | 1.8.20rc2, 2.0.11rc2, 2.2.2rc1, 2.3.0 |
Type: | Defect (Security) | Priority: | Critical |
Reporter: | Corey Shaw | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 0 |
Labels: | patch, permissions, security, usermedia | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Attachments: |
![]() |
||||
Issue Links: |
|
Description |
Based on the UI, I would assume (and hope) that only Zabbix Super Admins could modify the media for any user. In the UI, only Zabbix Super Admins can get to the Administration tab to make user changes. Using the API, I did a test today and found that a user of type "Zabbix Admin" user can modify the media for any users in the zabbix system! For history on why I found this, see CVE-2014-1685 |
Comments |
Comment by Corey Shaw [ 2014 Jan 23 ] |
1. Only Zabbix Super Admins can modify the media for any user. 2. All other types of users can only modify their own media. |
Comment by Eduards Samersovs (Inactive) [ 2014 Jan 24 ] |
Big thanks for Your patch! Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-7693 |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 24 ] |
(1) Zabbix admin users must be able to change media for themselves. You can use user.get with "editable" to check for both existence and permissions to the user. Eduards RESOLVED r.41893 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 24 ] |
(2) Minor typo correction in r41856. Eduards CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 27 ] |
(3) I'm still able to add new media to other users using user.updatemedia. Eduards RESOLVED r.41905 jelisejev The user.updatemedia method must perform all of the permission validation and field validation itself. It should not delegate it to addmedia and deletemedia. Eduards RESOLVED r.41966 jelisejev Please refactor the validation code the way we discussed. Eduards RESOLVED r.42017 jelisejev I've made changes in r42221, please review. Eduards OK, Thanks, please review r.42225 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 27 ] |
(4) user.addmedia and user.deletemedia must be validated as well. Eduards RESOLVED r.41905 Regarding user.addmedia: Regarding user.deletemedia: Eduards RESOLVED r.42017 jelisejev I've made some changes to deletemedia in r42214, please review. Eduards OK, please review r.42225 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 28 ] |
(5) There is a problem with the user.get method that needs to be fixed before we can resolve this issue. { "editable": true, "countOutput": true, "userids": [ "1" ] } The request above will always return "1" even if user "1" is not writable for the current user. Due to this bug we can still update media for other users as long as we specify only one user. Eduards RESOLVED r.41973,41974 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Jan 30 ] |
(6) Problems with usermedia.get: I'm logged in as an admin user. The following request should return all media for users in my user groups. Now it doesn't return anything. { "output": "extend" } Adding "editable" to the request must return only my media, but now it returns all of the media. Eduards RESOLVED r.42017 jelisejev CLOSED. |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Feb 04 ] |
TESTED. |
Comment by Eduards Samersovs (Inactive) [ 2014 Feb 04 ] |
Fixed in versions 2.3.0 (trunk) r.42234, 2.2.2rc1 r.42233 |
Comment by richlv [ 2014 Feb 05 ] |
(7) this removed translatable string "Cannot insert user media." and added a translatable "DBerror". two problems with that : a) it was done during string freeze; jelisejev Fixed directly in 2.2 r42325 and 2.3 r42326. |
Comment by richlv [ 2014 Feb 05 ] |
(8) this security problem has not been fixed for 1.8 and 2.0 - were they not vulnerable ? jelisejev RESOLVED
Eduards CLOSED |
Comment by Pavels Jelisejevs (Inactive) [ 2014 Feb 06 ] |
Fixed in 1.8.20rc2 r42354 and 2.0.11rc2 r42358. CLOSED. |
Comment by richlv [ 2014 Feb 06 ] |
------------------------- Users of type 'admin' may modify media for other users even though they should be able to modify their own media only. Please use CVE-2014-1685 to refer to this vulnerability. ------- Users of type 'admin' should be able to modify only their own media. Zabbix API allowed them to modify media for any user. This issue has been reported by Corey Shaw. ----------------- All of the Zabbix versions are vulnerable to this problem. -------------- These vulnerabilities have been fixed in the latest releases of Zabbix. The fix is available in the following Zabbix releases: |