Magento2: Magento 2 using a jQuery version with known vulnerabilities

Created on 27 Jan 2020  路  10Comments  路  Source: magento/magento2

Preconditions (*)

  1. Magento EE ver. 2.2.8
  2. I see that 2.3.x is using the same version of jQuery

Steps to reproduce (*)

  1. Install Magento
  2. check jQuery version that is packed with it

Expected result (*)

  1. Have a newer version of jQuery, possibly the latest
  2. Maybe having a mechanism of updating jQuery independently

Actual result (*)

  1. A security scan shows that the version of jQuery has known vulnerabilities:
  2. jQuery 1.12.4
  3. jQuery UI 1.10.4
Format is valid done Reported on 2.3.x

Most helpful comment

hi @engcom-Bravo,
If you treat this as a feature request it will be implemented only for the future versions. But this is a bug - a security bug - for the existing versions and should be patched in 2.2 and 2.3, not in 2.4 or above.
Regards

All 10 comments

Hi @valugi. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@valugi do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

Hi @engcom-Bravo. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

Hello @sdzhepa

This issue looks like a feature request, can you please move this to a propper repository?

Thank you

hi @engcom-Bravo,
If you treat this as a feature request it will be implemented only for the future versions. But this is a bug - a security bug - for the existing versions and should be patched in 2.2 and 2.3, not in 2.4 or above.
Regards

Hi @sdzhepa. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

  • [ ] 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.
  • [ ] 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • [ ] 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • [ ] 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!

  • [ ] 5. Add label Issue: Confirmed once verification is complete.

  • [ ] 6. Make sure that automatic system confirms that report has been added to the backlog.

@magento-engcom-team, this is a security issue. While this ticket, could use some improved documentation, Google itself recognizes this as a security flaw. This blantent notice looks bad for Magento. While I don鈥檛 agree it should be ported back to 2.2 versions, I do believe it should be in 2.3 as this issue presented itself in 2.3 and I鈥檇 like to see us move forward.

I cannot believe this is still open. Please update asap.

1. A security scan shows that the version of jQuery has known vulnerabilities:


* jQuery 1.12.4

This was patched directly in the file.

I guess you mean this and a few others: https://github.com/magento/magento2/pull/22418

1. Have a newer version of jQuery, possibly the latest

The newer releases break existing code.

Also see https://github.com/magento/magento2/commit/86fdea32b19df148a4eeaad0f81bd0db68dc0cef#diff-13e016f05effe828e3d5ababa4a62a15

As no details were provided about the exact problem (which CVE IDs are not fixed in our version) I think we can close this for now.

Still, most of the code still relies on jQuery 1.x and I think there were some PRs to make code compatible with jQuery 3 but would be a breaking change then.

Additionally I host patched versions at https://github.com/DanielRuf/snyk-js-jquery-174006/ and https://github.com/DanielRuf/snyk-js-jquery-565129

Was this page helpful?
0 / 5 - 0 ratings