arbitrary code execution in PDF.js.
a malicious PDF can execute arbitrary JS as soon as it's opened in Firefox.
https://codeanlabs.com/blog/research/cve-2024-4367-arbitrary-js-execution-in-pdf-js/
@mildsunrise doesn't that just make a malicious pdf as insecure as a malicious website (which can already execute arbitrary js)
@noiob but I haven't really looked so I could be wrong, maybe they apply special restrictions on the file: origin (or a CSP)
or on the other hand, maybe they give the code special permissions since it is part of the browser's core
@ugackMiner @noiob thanks, that's a relief
@mildsunrise @noiob my interpretation of the docs is that JS from file origin can't read arbitrary other files in a modern browser today. However, it's implementation defined so 🤷♂️
https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#file_origins
How universally true that is, and when it became the expectation, I don't know.
@noiob the PDF viewer (for a downloaded file) isn't executed in the context of a website, since it is a file:// URL. logic tells me it should be able to access arbitrary files in your computer and maybe also requests to a (possibly malicious, exfiltration target) server