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

One remaining CVE #1

Open
joejoseph00 opened this issue Sep 13, 2024 · 11 comments
Open

One remaining CVE #1

joejoseph00 opened this issue Sep 13, 2024 · 11 comments

Comments

@joejoseph00
Copy link
Member

joejoseph00 commented Sep 13, 2024

@olstjos
Copy link

olstjos commented Sep 30, 2024

6484 is questionable (weak?)

I suggest to look at fixing 6485 first:

CVE-2024-6485

@KlemenDEV
Copy link

Is a solution where tags would just be stripped ok?

@joejoseph00
Copy link
Member Author

joejoseph00 commented Sep 30, 2024

Yes agreed, I think as long as it is a narrow scope of stripping to just the cve scope , should be ok to strip

@joejoseph00
Copy link
Member Author

6485 should be first

@KlemenDEV
Copy link

Is 6484 even valid? One can put such link to any anchor with href

@joejoseph00
Copy link
Member Author

Is 6484 even valid? One can put such link to any anchor with href

I agree, 6484 doesn't make any sense to me and it hasn't been fully evaluated by the CVE folks.
both of these CVEs still say:

NVD assessment not yet provided.

The only one of these two CVEs that makes any sense to me would be 6485.

With that said, NVD hasn't assessed yet, would like to see what they say.

@sgdowney
Copy link

sgdowney commented Dec 17, 2024

My previous comment below was based on an incomplete understanding of how the carousel navigation works. You can use either the data-target or href, but not both. When both are present, the data-target is used and the href is ignored. To address this CVE, you have to consider if some kind of validation of the href should be performed.

If I understand this correctly, the bootstrap carousel uses anchor tags for the navigation buttons. Each anchor is expected to have a data-target and data-slide attribute. Any specified href attribute on the anchor is ignored, as the desired href value is generated using the data-target attribute. If the data-target attribute is missing, the bootstrap carousel processing is bypassed and the provided href is used as is instead of being generated by the bootstrap js. This allows a potential bad actor to inject javascript on the carousel navigation anchor.

@joejoseph00
Copy link
Member Author

@KlemenDEV does the explanation by @sgdowney help? There's probably an easy fix here from the sound of it.

@KlemenDEV
Copy link

KlemenDEV commented Dec 18, 2024

I am still not sure if this is a valid CVE. This would require the attacker to have access to href, which is unusual for the carousel if it is unused. If JS alters href on the go, the same JS could also do what JS in href would do directly.

If the problem is only in cases where JS is placed in href during HTML building, this issue can be fixed by stripping href on DOM load for example, but this does not make much sense to me.

If the problem is if href also changes later, not sure how to prevent that, and also in this case as I said the code that changes href could execute stuff directly without placing itself in href and waiting for the user to click it.

@sgdowney
Copy link

sgdowney commented Jan 7, 2025

This is a tricky one. The carousel navigation will first use the data-target attribute. If not present, it uses the href. Are there specific rules you enforce on the href attribute of a carousel navigation anchor?
Rules such as:

  • No JS
  • No external domains

@KlemenDEV
Copy link

This CVE assumes the generated HTML is not sanitized. At least in Drupal Boostrap theme, data-target is fixed and thus can't really be exploited

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

4 participants