-
Notifications
You must be signed in to change notification settings - Fork 166
Closed as not planned
Closed as not planned
Copy link
Description
Issue:
The application processes user-uploaded PDF and DOCX files entirely on the client-side using third-party libraries (pdf.js
and mammoth.js
). However, there is currently no validation or sanitization of file contents before processing.
Impact:
Malicious files could exploit vulnerabilities in pdf.js
or mammoth.js
if not properly sandboxed. There is no warning for unsupported or potentially dangerous file types, and no mitigation measures are evident.
Details:
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.16.105/pdf.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.4.16/mammoth.browser.min.js"></script>
Recommended Actions:
- Add file type validation and sanitization before processing uploads.
- Display warnings to users about potential risks associated with uploading files.
- Investigate sandboxing or isolating third-party library execution.
- Consider server-side scanning or checks for malicious files before client-side processing.
References:
This issue is raised for improving the security posture of the application and protecting users from possible client-side exploits due to unsafe file handling.
Metadata
Metadata
Assignees
Labels
No labels