Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug: Arbitrary File Read via Playwright's Screenshot Feature Exploiting File Wrapper #47

Closed
timoxoszt opened this issue Jun 3, 2024 · 6 comments · Fixed by #48
Closed

Comments

@timoxoszt
Copy link

Hello @jasonraimondi,

I have a vulnerability report.

Please see the attached PDF for detailed information.

Arbitrary File Read via Playwright's Screenshot Feature Exploiting File Wrapper.pdf

Thanks.

@jasonraimondi
Copy link
Owner

jasonraimondi commented Jun 3, 2024

@timoxoszt This is amazing! Thank you very much for this report. I will get these changes in ASAP 👍

jasonraimondi added a commit that referenced this issue Jun 4, 2024
prevent file:// URI scheme in Playwright screenshots

A critical vulnerability was discovered in a web application feature that utilizes
Playwright's screenshot capability. Attackers could exploit this vulnerability by
using the file:// URI scheme to read arbitrary files on the server's filesystem,
potentially exposing sensitive information, such as AWS credentials.

This commit addresses the vulnerability by implementing proper input validation
and sanitization to prevent the use of the file:// URI scheme in Playwright
screenshot requests, mitigating the risk of unauthorized file access.

resolves #47
jasonraimondi added a commit that referenced this issue Jun 4, 2024
prevent file:// URI scheme in Playwright screenshots

A critical vulnerability was discovered in a web application feature that utilizes
Playwright's screenshot capability. Attackers could exploit this vulnerability by
using the file:// URI scheme to read arbitrary files on the server's filesystem,
potentially exposing sensitive information, such as AWS credentials.

This commit addresses the vulnerability by implementing proper input validation
and sanitization to prevent the use of the file:// URI scheme in Playwright
screenshot requests, mitigating the risk of unauthorized file access.

resolves #47
jasonraimondi added a commit that referenced this issue Jun 4, 2024
prevent file:// URI scheme in Playwright screenshots

A critical vulnerability was discovered in a web application feature that utilizes
Playwright's screenshot capability. Attackers could exploit this vulnerability by
using the file:// URI scheme to read arbitrary files on the server's filesystem,
potentially exposing sensitive information, such as AWS credentials.

This commit addresses the vulnerability by implementing proper input validation
and sanitization to prevent the use of the file:// URI scheme in Playwright
screenshot requests, mitigating the risk of unauthorized file access.

resolves #47
jasonraimondi added a commit that referenced this issue Jun 4, 2024
prevent file:// URI scheme in Playwright screenshots

A critical vulnerability was discovered in a web application feature that utilizes
Playwright's screenshot capability. Attackers could exploit this vulnerability by
using the file:// URI scheme to read arbitrary files on the server's filesystem,
potentially exposing sensitive information, such as AWS credentials.

This commit addresses the vulnerability by implementing proper input validation
and sanitization to prevent the use of the file:// URI scheme in Playwright
screenshot requests, mitigating the risk of unauthorized file access.

resolves #47
@timoxoszt
Copy link
Author

Hello @jasonraimondi,

Would you mind publishing a CVE for this?

@jasonraimondi
Copy link
Owner

Hey @timoxoszt, not entirely sure how to do that. I don't mind doing it, I'm just not sure what to do. Do you have an example you can point me towards?

@timoxoszt
Copy link
Author

Hey @jasonraimondi,

This guide on GitHub walks through publishing a security advisory, which should include publishing a CVE: https://docs.github.com/en/code-security/security-advisories/working-with-repository-security-advisories/publishing-a-repository-security-advisory

@timoxoszt
Copy link
Author

Hello @jasonraimondi ,

I hope you're having a good day. I would like to request an update on the status of this CVE. I noticed that GHSA-665w-mwrr-77q3 was published last week. If you haven't already submitted a CVE Request, please scroll to the bottom of the advisory form and click Request CVE.

image

Thank you, and I look forward to hearing from you soon.

@jasonraimondi
Copy link
Owner

jasonraimondi commented Jun 10, 2024

@timoxoszt Just clicked that button 👍

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants