-
Notifications
You must be signed in to change notification settings - Fork 101
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
Fix CVE-2023-31606 (ReDOS possible in the sanitize_html function) #75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works fine, LGTM
@korny - guessing the maintainer of this gem is MIA. Would it be worth forking the gem, renaming slightly, publishing a new version? (ScarletCloth?) Weirdly, v4.3.2...sofatutor:redcloth:fix-CVE-2023-31606 has a few extra differences which result in
Though it's not obvious to me why anything there would make it skip trying to compile: |
@korny , @doconnor-clintel : do you know if the patch has been published to rubygems? |
I'm no longer able to maintain this repo but am happy to turn it over to someone with interest and inclination. Feel free to reach out if you are interested. |
@joshuasiler : 👋 |
I just checked the repo, and it turns out that while I have read/write access, I do not have admin access to the repo. So I am unable to transfer admin. Best bet would be to contact the original owner or fork the repo. Sorry I can't help further. |
I’m admin and would be happy to give out additional access. It’s been on my to-do list to look at this PR but I haven’t gotten to it, yet.
From: Joshua Siler ***@***.***>
Date: Friday, October 27, 2023 at 12:55 PM
To: jgarber/redcloth ***@***.***>
Cc: Subscribed ***@***.***>
Subject: Re: [jgarber/redcloth] Fix CVE-2023-31606 (ReDOS possible in the sanitize_html function) (PR #75)
I just checked the repo, and it turns out that while I have read/write access, I do not have admin access to the repo. So I am unable to transfer admin. Best bet would be to contact the original owner or fork the repo. Sorry I can't help further.
—
Reply to this email directly, view it on GitHub<#75 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAAB67ORN3POVSVYSODM7CTYBPRRBAVCNFSM6AAAAAAZXLBSKOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGIZDMNRRGM>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
@jgarber that would be great if that's a possibility. I work for GitLab (https://gitlab.com/digitalmoksha). We still use RedCloth - it’s not a huge component for us, but we do still use it. I also use it on a couple of older personal projects. I would be interested in being able to maintain it, at the very least getting the security fixes published. Do you think this would be a possibility? I don’t have a huge amount of time to devote to it, but I would rather see the security problems dealt with in the main gem rather than relying on forks. And there are a couple other fixes that I think would be useful for the community. wdyt? |
@jgarber : rooting for you to pick either @digitalmoksha or myself as a new admins! |
@digitalmoksha @heliocola Sent you both access. Thank you so much for stepping up! 🙏 |
Thank you @jgarber 🙇 |
Thank you @jgarber ! |
@heliocola You’re a rubygems admin now. Thank you so much for getting these fixes to a release! |
A potential fix for #73 (https://github.com/e23e/CVE-2023-31606#readme).
The use of a possessive quantifier effectively prevents backtracking in the second group (which matches the tag):
In this case, the
\w*+
part (and therefore, the whole group([A-Za-z]\w*+)
) will not backtrack. The rest of this regex is not subject to ReDoS (it's linear). So, we can use this version; it should work in Ruby 1.9 and up.