-
Notifications
You must be signed in to change notification settings - Fork 13
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
XSS vulnerabilities in from, to and range parameters. #95
Comments
Hi @rsdoiel , The real fix would be to validate the values on their way in, in At a glance, the list of Does that help initially? I can't comment on the maintenance of this module. PS There's also this comment: https://github.com/eprints/irstats2/blob/master/lib/plugins/EPrints/Plugin/Stats/Context.pm#L365 ..!? |
Regarding maintenance, we had implemented locally implemented many GUI changes especially for better usability, responsive GUI and improving accessibility, as well as new reports for citation, journal/publisher and Open Access statistics. |
More investigation: |
(just some notes for reference):
Fields referenced during
NB ran out of time reviewing these - anyone else feel free to chip in, or I'll continue when I get a spare moment! |
I'll figure out a simple patch, make a diff and attach it here (hopefully next week). My current plan it to strip '<' and '>' in the linked loop example for processing the session variables. That'll solve the injection risk. Thank you everyone for the help. All the best, Robert |
In many cases we use https://metacpan.org/pod/CGI::IDS for securing CGI scripts . This library covers many more attack vectors than the one with '<' '>' and is worth having a look at it. |
Will take a look, thanks Robert |
@rsdoiel - just wondering if you got anywhere with this? I could take a look today at creating some validation methods. |
Good Morning John,
No haven't had a chance to get back to this yet (a few other non-EPrints
issues are my priority at the moment). Hopefully this week or next. It's a
low priority for me at the moment but is something I will need to address
as the security ticket open where I work will need to be resolved either by
fixing it or disable IRStats2.
Thanks,
Robert
…On Tue, Feb 4, 2020 at 4:43 AM John Salter ***@***.***> wrote:
@rsdoiel <https://github.com/rsdoiel> - just wondering if you got
anywhere with this? I could take a look today at creating some validation
methods.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#95?email_source=notifications&email_token=AABJIPNUGI2FL355P3RR6KDRBFPIBA5CNFSM4KK3RA22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKXPXWY#issuecomment-581893083>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABJIPP7YCIUTYXRDWXEUQLRBFPIBANCNFSM4KK3RA2Q>
.
|
Did anyone fix this? CGI::IDS does not "ring the bell"! |
I don't think this has been solved, I know I haven't had a chance to pursue the suggested fixes. EPrints for us is in maintenance only mode. Caltech Library is not doing active development inside EPrints or with the EPrints plugin system. Our mid-range plans is to have a stats system that works across our mix of repository systems so ultimately I think IRStats will be replaced at Caltech Library. All the best, Robert |
Thanks. I fixed it with CGI::IDS, parsing the filter parameters. |
Here is a solution: https://github.com/eprintsug/IDS |
Did a bit of PHP inspired regex to solve this issue and came up with this:
Not perfect but seems to filter out trouble makers. |
json-ld/json-ld.org#390 |
@liamgh ^ |
Possible fixes added to https://github.com/eprintsug/irstats2/tree/issue-17-xss |
There is an XSS vunerablity in the "from", "to" and "range" GET parameters for URLs accessing IRStats2 1.0.1 as well as IRStats2 1.1
under EPrints 3.3.
Example paths
Before processing "from", "to", "range" the values need to be sanitized (e.g. the
<
and>
stripped at a minimum). Not sure where this should happen in the Perl code.Is IRStats2 being maintained (last update appears to be 2017 and two pull requests are unanswered)?
Thanks,
Robert
The text was updated successfully, but these errors were encountered: