You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RStudio IDE comes with Mathjax 2.7 bundled. This is used by rmarkdown when local mode is used for example.
Path is stored in Sys.getenv("RMARKDOWN_MATHJAX_PATH").
A pro customer has requested we bundle woff fonts, currently only otf is included in /usr/lib/rstudio/resources/mathjax-27/fonts/HTML-CSS/TeX/. Can this change be made when upgrading to MathJax3? (woff2 as well if included in MathJax3: mathjax/MathJax#1990)
I see this is slated for 2024, but I was wondering if it would be feasible to bump it up the priority list, as there is a known XSS vulnerability in versions of MathJax earlier than 2.7.4.
Alternatively, should I open an issue for bumping the version up to a 2.7.5?
My understanding is that MathJax 3 has a number of API changes that may require some extra work to adapt to. It should be easier for us to take the latest version of MathJax 2.7, though.
We'll plan to update to the latest version of Mathjax 2.7; updating to Mathjax 3 will take more time / effort than we have available for the upcoming release. #11535
We could leave this open, but @kevinushey comments still apply here
updating to Mathjax 3 will take more time / effort than we have available for the upcoming release
I think there are some more changes between 2 and 3 that needs testing, and Mathjax 4 is already in beta, so 2 to 4 will probably be the next move. But I don't know the impact. Maybe we'll stop providing our own bundle, and use CDN one. we'll see;
Just wanted to note that I use the TeX input extensions introduced in MathJax 3 (see here) in my writing, and it would be really great to see them included in the otherwise-great visual editor! Currently most of my equations don't render correctly because of this. Sounds like it might be a fair amount of work to upgrade though, so I understand if it can't be done super soon.
Updating MathJax from 2.7.9 has come up in internal support ticket #116287 re CVE-2023-39663
Mathjax up to v2.7.9 was discovered to contain two Regular expression Denial of Service (ReDoS) vulnerabilities in MathJax.js via the components pattern and markdownPattern. NOTE: the vendor disputes this because the regular expressions are not applied to user input; thus, there is no risk.
These regular expressions would be a concern if they were applied to user-supplied strings, but they are only applied to MathJax-supplied strings, and those strings don't include the troublesome situations like the ones you are suggesting. Users can't call these functions directly (and if they could, you would have much bigger problems than this).
Activity
JsizzleR commentedon Oct 27, 2021
A pro customer has requested we bundle
wofffonts, currently onlyotfis included in/usr/lib/rstudio/resources/mathjax-27/fonts/HTML-CSS/TeX/. Can this change be made when upgrading to MathJax3?(woff2 as well if included in MathJax3: mathjax/MathJax#1990)
Customer request no. 67732
scarnecchia commentedon Jun 29, 2022
I see this is slated for 2024, but I was wondering if it would be feasible to bump it up the priority list, as there is a known XSS vulnerability in versions of MathJax earlier than 2.7.4.
Alternatively, should I open an issue for bumping the version up to a 2.7.5?
kevinushey commentedon Jun 29, 2022
My understanding is that MathJax 3 has a number of API changes that may require some extra work to adapt to. It should be easier for us to take the latest version of MathJax 2.7, though.
jthomasmock commentedon May 21, 2024
X-posting this as well: https://forum.posit.co/t/https-mathjax-rstudio-com-latest-mathjax-js-has-security-vulnerabilities/186991
kevinushey commentedon May 22, 2024
We'll plan to update to the latest version of Mathjax 2.7; updating to Mathjax 3 will take more time / effort than we have available for the upcoming release. #11535
cderv commentedon Jul 11, 2024
Update on this : mathjax.rstudio.com/latest has been updated to 2.7.9
ronblum commentedon Jul 18, 2024
We're at 2.7.9, but let's leave this open in "Later" for a possible future in which we use MathJax 3. Or should we close this altogether?
cderv commentedon Jul 18, 2024
We could leave this open, but @kevinushey comments still apply here
I think there are some more changes between 2 and 3 that needs testing, and Mathjax 4 is already in beta, so 2 to 4 will probably be the next move. But I don't know the impact. Maybe we'll stop providing our own bundle, and use CDN one. we'll see;
Thanks @ronblum !
[-]Update Mathjax to version 3[/-][+]Consider updating Mathjax to version 3 or 4[/+]ronblum commentedon Jul 18, 2024
I reworded the subject line to reflect this. 🙂
GregDMeyer commentedon Aug 14, 2024
Just wanted to note that I use the TeX input extensions introduced in MathJax 3 (see here) in my writing, and it would be really great to see them included in the otherwise-great visual editor! Currently most of my equations don't render correctly because of this. Sounds like it might be a fair amount of work to upgrade though, so I understand if it can't be done super soon.
lachlansimpson commentedon Mar 20, 2025
Updating MathJax from 2.7.9 has come up in internal support ticket #116287 re CVE-2023-39663
From the MathJax repo issue:
upgrade inline math previews to mathjax 4 (#18210)
kevinushey commentedon Jul 20, 2026
The next release of RStudio (coming in August) will use Mathjax 4.