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

Is react-i18next vulnerable to CVE-2021-23346 ? #1275

Closed
andyedwardsibm opened this issue Mar 10, 2021 · 12 comments · Fixed by #1283 or i18next/next-i18next#1144
Closed

Is react-i18next vulnerable to CVE-2021-23346 ? #1275

andyedwardsibm opened this issue Mar 10, 2021 · 12 comments · Fixed by #1283 or i18next/next-i18next#1144
Labels

Comments

@andyedwardsibm
Copy link

🐛 Bug Report

Raising as an issue here as I'm not sure this makes sense to ask on SO

To Reproduce

If you want to see the bug in html-parse-stringify2 then run...

const p = require('html-parse-stringify2')

console.log('parsing')
p.parse("<!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''!")
console.log('parsed')

This does not complete in a timely manner.

Running the following does complete quickly, but maybe I just can't think of a "bad" input yet.

const p = require('html-parse-stringify2')

console.log('parsing')
p.parse("<0><!'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''!></0>")
console.log('parsed')

Expected behavior

Hopefully you confirm this is not applicable

Your Environment

  • runtime version: Node v14
  • i18next version: i.e. 14.1.1
  • os: Linux
@adrai
Copy link
Member

adrai commented Mar 10, 2021

imo, thanks to the <0> wrapping the vulnerability has no effect to react-i18next's Trans component.
Nevertheless, it would be nice, if the html-parse-stringify2 package would be updated.

@mbochynski
Copy link

@adrai would it be possible to switch to https://github.com/HenrikJoreteg/html-parse-stringify where this vulnerability has been fixed?

@adrai
Copy link
Member

adrai commented Mar 17, 2021

if it includes everything html-parse-stringify2 has, probably yes...
did not check it...
if you like, you can try, execute and maybe extend the tests and make a PR

@japrescott
Copy link

@mbochynski it seems that the linked repo is actually the original of html-parse-stringify2. So we should be able to switch to html-parse-stringify

@adrai
Copy link
Member

adrai commented Mar 19, 2021

feel free to try a PR

@kachkaev
Copy link
Contributor

kachkaev commented Mar 19, 2021

I tried fixing this in #1283, but not much luck so far. Are there any alternatives to html-parse-stringify / html-parse-stringify2 we can try?

@stale
Copy link

stale bot commented Mar 26, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 26, 2021
@kachkaev
Copy link
Contributor

bump

@stale stale bot removed the stale label Mar 26, 2021
@stale
Copy link

stale bot commented Apr 3, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 3, 2021
@adrai adrai removed the stale label Apr 3, 2021
@stale
Copy link

stale bot commented Apr 10, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Apr 10, 2021
@adrai adrai added pr hold and removed stale labels Apr 10, 2021
@alon24
Copy link

alon24 commented Apr 11, 2021

Are there any news here, I imagine I am not the only one who is suffering from this

@adrai
Copy link
Member

adrai commented Apr 11, 2021

@alon24 first of all, there is no real suffering, because this CVE seems not to affect react-i18next at runtime...
Nevertheless, it would be nice if we could also update that dependency... so currently we're waiting for @HenrikJoreteg to check for #1283 (comment)
or for @rayd to check rayd/html-parse-stringify2#27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
6 participants