magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.57k stars 9.32k forks source link

magento/magento2-base module dependency issue #34562

Open t-heuser opened 3 years ago

t-heuser commented 3 years ago

Preconditions (*)

  1. Magento 2.4.3-p1
  2. Use roave/security-advisories to check for vulnerabilities in your dependencies

Steps to reproduce (*)

  1. Run composer require --dev roave/security-advisories:dev-latest or composer update --dry-run roave/security-advisories (if package already installed)

Expected result (*)

  1. The process should be successful.

Actual result (*)

Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - magento/product-community-edition is locked to version 2.4.3-p1 and an update of this package was not requested.
    - roave/security-advisories dev-latest conflicts with tinymce/tinymce <5.10 (magento/magento2-base 2.4.3-p1 replaces tinymce/tinymce 3.4.7).
    - magento/product-community-edition 2.4.3-p1 requires magento/magento2-base 2.4.3-p1 -> satisfiable by magento/magento2-base[2.4.3-p1].
    - Root composer.json requires roave/security-advisories dev-latest -> satisfiable by roave/security-advisories[dev-latest].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Explanation

2 days ago, "tinymce/tinymce" was added as vulnerable below version 5.10 (commit). Since then it's not possible to run the security check as it always fails as in the composer.json of the package magento/magento2-base you can find the following line:

    "replace": {
        "trentrichardson/jquery-timepicker-addon": "1.4.3",
        "components/jquery": "1.11.0",
        "blueimp/jquery-file-upload": "5.6.14",
        "components/jqueryui": "1.10.4",
        "twbs/bootstrap": "3.1.0",
        "tinymce/tinymce": "3.4.7"
    },

Magento doesn't require tinymce directly as composer package but replaces it which is enough to trigger the security alert. Maybe the replace should be removed as I don't really see a sense in it.

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

m2-assistant[bot] commented 3 years ago

Hi @oneserv-heuser. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:

Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

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

For more details, review the Magento Contributor Assistant documentation.

Add a comment to assign the issue: @magento I am working on this

To learn more about issue processing workflow, refer to the Code Contributions.


:clock10: You can find the schedule on the Magento Community Calendar page.

:telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

:movie_camera: You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

m2-assistant[bot] commented 3 years ago

Hi @engcom-Hotel. 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:

engcom-Hotel commented 3 years ago

Hello @oneserv-heuser,

Thanks for posting this issue!

The issue is reproducible for us and I agree with your point. So we are confirming this issue.

Thanks

github-jira-sync-bot commented 3 years ago

:white_check_mark: Jira issue https://jira.corp.magento.com/browse/AC-1667 is successfully created for this GitHub issue.

m2-assistant[bot] commented 3 years ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

fredden commented 3 years ago

For reference, there are several security issues listed here affecting version 3.4.7 of tinymce: https://snyk.io/vuln/npm:tinymce

mautz-et-tong commented 2 years ago

More than 6 weeks are needed for the issue logistics of a security fix. This is about one line of code.

Better rename more things and replace logos. Much more important.

Lex50 commented 2 years ago

Pardon my ignorance, but what might be a good work-around for this?

I can remove roave/security-advisories with..

composer remove --no-update roave/security-advisories
composer update roave/security-advisories

but can anyone recommend a simple patch/fix to remove the conflict with tinymce/tinymce, that doesn't require waiting for Adobe?

t-heuser commented 2 years ago

@Lex50 I don't think that there i a simple solution to this other than removing roave/security-advisories or downgrade it to a version where there is no conflict with tinymce/tinymce (which would make the whole point of roave/security-advisories useless). If you're running roave/security-advisories manually you can ignore the error, but in CI/CD, no chance I think.

Lex50 commented 2 years ago

@oneserv-heuser thank you :)

Ocramius commented 2 years ago

downgrade it to a version where there is no conflict with tinymce/tinymce

There are only dev-latest and dev-master of roave/security-advisories: they point to the same ref, and, by design, they include tinymce/tinymce as exclusions.

The only workaround here is to say that the package replaces "tinymce/tinymce": "x.y.z", where x.y.z is a version not affected by security issues (needs upgrading of tinymce too)

t-heuser commented 2 years ago

More than 6 weeks are needed for the issue logistics of a security fix. This is about one line of code.

Better rename more things and replace logos. Much more important.

More than 8 months now 😂

mautz-et-tong commented 2 years ago

This official repository is getting a clown show more and more. Can't wait for the community to take over and start the fork. Adobe seems to be not able to handle this

upbott-gulshan commented 2 years ago

Any update on this? This seems blocking upgrade to latest versions.

Morgy93 commented 2 years ago

Still an issue with latest 2.4.5-p1.

Maksold commented 1 year ago

The same problem is on 2.4.2-p2

composer require --dev roave/security-advisories:dev-latest                                                                                                                                                                                                                                                                                                                              

  Problem 1
    - magento/product-community-edition is locked to version 2.4.2-p2 and an update of this package was not requested.
    - roave/security-advisories dev-latest conflicts with tinymce/tinymce <5.10.7|>=6,<6.3.1 (magento/magento2-base 2.4.2-p2 replaces tinymce/tinymce 3.4.7).
    - magento/product-community-edition 2.4.2-p2 requires magento/magento2-base 2.4.2-p2 -> satisfiable by magento/magento2-base[2.4.2-p2].
    - Root composer.json requires roave/security-advisories dev-latest -> satisfiable by roave/security-advisories[dev-latest].
renttek commented 1 year ago

Any update on this?

rubenromao commented 1 year ago

Any updates?? Same issue in 2.4.6

mautz-et-tong commented 1 year ago

Come on @AntonEvers this is ridiculous

ghost commented 1 year ago

Same here.

rubenromao commented 8 months ago

Really ?!

This is more than ridiculous...

The problem persists in magento 2.4.6-p4:

- magento/product-community-edition is locked to version 2.4.6-p4 and an update of this package was not requested.
- roave/security-advisories dev-master conflicts with tinymce/tinymce <5.10.9|>=6,<6.7.3 (magento/magento2-base 2.4.6-p4 replaces tinymce/tinymce 3.4.7).
- magento/product-community-edition 2.4.6-p4 requires magento/magento2-base 2.4.6-p4 -> satisfiable by magento/magento2-base[2.4.6-p4].
- Root composer.json requires roave/security-advisories dev-master -> satisfiable by roave/security-advisories[dev-master]. 

Almost 3 years passed since this was reported and there's no fix yet?

Am I missing something here?

rrodrigonuez-i4 commented 8 months ago

Indeed, it is ridiculous... I had to create a fork of roave/security-advisories and adapt it for Magento projects... That's the only way we found to keep using roave/security-advisories and not blocking the development.

mautz-et-tong commented 8 months ago

They simply stopped caring a long time ago. They have given up. Better switch to https://mage-os.org/