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

[GHSA-rrr8-f88r-h8q6] find-my-way has a ReDoS vulnerability in multiparametric routes #4859

Open
wants to merge 1 commit into
base: sealonohana/advisory-improvement-4859
Choose a base branch
from

Conversation

sealonohana
Copy link

Updates

  • Affected products
  • CVSS v3

Comments
follow-my-way v4.1.0 is NOT exploitable by CVE-2024-45813. The following test does NOT fail on Node 12 NPM 6 follow-my-way v4.1.0:```javascript
test('prevent back-tracking', (t) => {
t.plan(0)
t.setTimeout(20)
const findMyWay = FindMyWay({
defaultRoute: () => {
t.fail('route not matched')
}
})
findMyWay.on('GET', '/:foo-:bar-', (req, res, params) => {})
findMyWay.find('GET', '/' + '-'.repeat(200000000) + 'a', { host: 'fastify.io' })
})


The reason is that CVE-2024-45813 exploits mechanism that does not exist in v4.1.0. CVE-2024-45813 exploits a mechanism to check the validity of a given regex, and could cause a ReDoS. At some point after 4.1.0, the maintainer transformed the function `router.prototype._on` to use loops instead of recursion. This mechanism does NOT exist in version 4.1.0.

@github
Copy link
Collaborator

github commented Oct 1, 2024

Hi there @delvedor! A community member has suggested an improvement to your security advisory. If approved, this change will affect the global advisory listed at github.com/advisories. It will not affect the version listed in your project repository.

This change will be reviewed by our Security Curation Team. If you have thoughts or feedback, please share them in a comment here! If this PR has already been closed, you can start a new community contribution for this advisory

@github-actions github-actions bot changed the base branch from main to sealonohana/advisory-improvement-4859 October 1, 2024 11:46
@darakian
Copy link
Contributor

darakian commented Oct 1, 2024

Hey @sealonohana, thanks for the PR. We got out ranges from the maintainer's repo advisory
GHSA-rrr8-f88r-h8q6

Would you mind reaching out to them to determine a lower bound for the advisory?

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

Successfully merging this pull request may close these issues.

3 participants