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

Upgrade jQueryUI #1020

Closed
florianm opened this issue Jul 25, 2023 · 4 comments
Closed

Upgrade jQueryUI #1020

florianm opened this issue Jul 25, 2023 · 4 comments
Assignees

Comments

@florianm
Copy link

First of all, servus and thanks for this wonderful admin integration. We've been using it in various projects for a decade now at @dbca-wa and recently at @wagov.

Our security audit flagged a mildly outdated dependency of django-grappelli to jQueryUI 1.13.0 whereas the latest version at the time of writing is jQueryUI 1.13.2 requiring jQuery 1.8+ (django-grappelli uses jQuery 3.6.0).

Would it be possible to bump jQueryUI to 1.13.2, and possibly enabling Dependabot dependency scanning?
Happy to submit a PR if this helps.

@sehmaschine
Copy link
Owner

dependabot scanning is already active. but we don't see an alert for jqueryui. any details on this?

@sehmaschine sehmaschine self-assigned this Jul 27, 2023
@florianm
Copy link
Author

florianm commented Jul 27, 2023

We commissioned a security audit from a consultancy for a Django project that uses django-grappelli. The project is about to go live to a wider audience, so we're keen to address as many findings as possible, as menial as they seem. Happy to assist where I can.

The consultants flagged as a "low priority" finding:

APP-2 Software Flaws: Outdated and Vulnerable JavaScript Libraries

Description

When vulnerabilities are identified in software the vendor of that product generally releases a ‘patch’ to fix the problem. Where these patches are not deployed in a timely manner, the vulnerabilities in the unpatched components could be exploited by an attacker.

We identified that the Application Portal application makes use of outdated JavaScript libraries with known security flaws, which could potentially be leveraged to perform attacks against application users under specific circumstances.

The vulnerabilities within the libraries include Cross-Site Scripting (XSS) and Prototype Pollution.

Proof of Concept

Vulnerable libraries:

  • jQuery-UI version 1.13.0 https:/DOMAIN/static/grappelli/jquery/ui/jqueryui.min.js

Consequence Moderate: If exploited, the issues affecting these JavaScript libraries could be leveraged to execute attacker-controlled scripts within the victim browser, thereby potentially allowing an attacker to compromise the confidentiality, integrity or availability of Application Portal web application.

Likelihood Rare: Exploitation of these flaws is only possible under very specific circumstances, and no specifically exploitable condition was identified in the time available.

Risk

Low

Remediation

Update to the latest version of the affected libraries.
References https://cheatsheetseries.owasp.org/cheatsheets/Third_Party_Javascript_Management_Cheat_Sheet.html#keeping-javascript-libraries-updated
https://security.snyk.io/package/npm/jquery-ui/1.13.0
Vulnerability: https://security.snyk.io/vuln/SNYK-JS-JQUERYUI-2946728

jquery-ui is a library for manipulating UI elements via jQuery.

Affected versions of this package are vulnerable to Cross-site Scripting (XSS) via the initialization of check-box-radio widget on an input tag enclosed within a label, which leads to the parent label contents being considered as the input label.

Exploiting this vulnerability is possible if a .checkboxradio( "refresh" ) call is executed on such a widget, and the initial HTML contains encoded HTML entities, leading them to be erroneously decoded.

Upgrade jquery-ui to version 1.13.2 or higher.

I hope the above helps. Let me know if a PR would make your life easier.

sehmaschine added a commit that referenced this issue Jul 27, 2023
@sehmaschine
Copy link
Owner

I've updated jQuery UI with the stable branch. I'm waiting a bit before a new release, so users can check if there are any issues (although everything looks fine with my local tests).

@florianm
Copy link
Author

Thanks for the quick turnaround!

dive-robin-varghese pushed a commit to dive-robin-varghese/django-grappelli that referenced this issue Nov 29, 2023
dive-robin-varghese pushed a commit to industrydive/django-grappelli that referenced this issue Dec 7, 2023
sehmaschine added a commit that referenced this issue Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants