mirror of
https://github.com/opensolutions/ViMbAdmin.git
synced 2026-04-26 00:36:00 +03:00
[GH-ISSUE #250] Security update: CVE-2017-5870 and CVE-2017-6086 #200
Labels
No labels
bug
feature
feature
improvement
improvement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ViMbAdmin-opensolutions#200
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Fmstrat on GitHub (Aug 8, 2018).
Original GitHub issue: https://github.com/opensolutions/ViMbAdmin/issues/250
It seems there are multiple cross-site request forgery (CSRF) vulnerabilities within the latest version of ViMbAdmin. Can we get a status on these fixes?
Seems the timeline states that you don't have time to fix bask in 2017, but wondering if any solution is in place now?
References:
@barryo commented on GitHub (Aug 13, 2018):
No solution yet in place and no immediate free time to look at this. However this issue has bumped it back into my list of priorities.
If anyone wants to contribute to pushing this further up the list, the commercial support route would be a practical way of doing this.
ViMbAdmin is used by the vast majority of users as an in-house single-organisation tool and as such the exposure of both if these CVE's is - to my mind - much less than the CVE assigned scores.
@Fmstrat commented on GitHub (Aug 20, 2018):
@barryo As both of these are CSFR issues, I would certainly say they warrant the level of CVE assignment, even if they are in-house single-organization installs. These smaller systems mean smaller teams, and impact could be catastrophic for a small organization (or person) that can't figure out what's going on. That being said, CSFRs are easy to fix.
In any PHP header file that has a form in it, just add:
In the
<form>itself, add:And after submit, before any functions are called, add:
edit Oops, cut and paste error below, fixed!
This would eliminate both CVEs.
@Fmstrat commented on GitHub (Aug 20, 2018):
I should note, the above solution uses
hash_equalsfor checking the token, which is in PHP 5.6+ only, but available to earlier versions with the hash-compat library: https://github.com/indigophp/hash-compatSome saying just using
==or===is OK, buthash_equalsis the true "secure" way to do it.@Fmstrat commented on GitHub (Aug 21, 2018):
I'm about to fork and work on a PR.
@Fmstrat commented on GitHub (Aug 22, 2018):
OK, I've started CSFR fixes on POSTS, but I realize the CVE also has GET issues, too. I wasn't sure of the details on your Zend implementation since much of it looks custom in your framework, so I did it the old fashion way, but it's clean, matches your code structure, and works.
Here's a commit with one form fixed. Let me know if you have issues with this structure as I'm going to use it across all forms, and then address the GET issues.
github.com/Fmstrat/ViMbAdmin@e82386f263EDIT
This is for reference. I'll likely make
createTokeninclude all of the code to centralize, and centralize the token check. It's just to make sure you don't have any reason to not implement this way.EDIT 2
Consolidated, see full diff: https://github.com/opensolutions/ViMbAdmin/compare/master...Fmstrat:master
EDIT 3
Since I'm not familiar with the full structure of things, I could keep moving with things, but let me know if you look at this and are like "Oh I could do this in an hour" because it would likely take me much longer.
@barryo commented on GitHub (Aug 22, 2018):
Hi @Fmstrat - thanks for the effort here.
Unfortunately, the way you've done it is not how we'd go about it (but it's close). We've already solved this in another project using the same backend code. Here are some links:
github.com/inex/IXP-Manager@47e2d7de1cgithub.com/inex/IXP-Manager@5a3ccfe62fgithub.com/inex/IXP-Manager@bc824f8abegithub.com/inex/IXP-Manager@75d82db682github.com/inex/IXP-Manager@2058294b3b (diff-49a23926d7)I've no issue looking at this when I have time, but if you want to look at it, the above should help.
To accept a more significant piece of code like this into the project, I'd also need you to sign an as yet unwritten CLA but something like this: https://github.com/inex/IXP-Manager/wiki/Contributor-License-Agreement
(side note: mcrypt is deprecated, please use random_bytes())
@Fmstrat commented on GitHub (Aug 22, 2018):
@barryo Yeaaaaa since I'm not that familiar with Zend, sounds like it would take me waaaaayyyy longer than makes sense given you already have a solution in place elsewhere. I'd love to help, but I might not be the right person (given the time I have currently).