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
{{ message }}
Repository navigation
[BUG] Security: Subresource Integrity (SRI) verification for FFmpeg binaries is completely bypassed #1575
The project includes a security mechanism to verify the Subresource Integrity (SRI) of the ffmpeg-core.js and ffmpeg-core.wasm files before loading them. The SRI_HASHES dictionary and fetchWithIntegrity() function were explicitly added to src/lib/ffmpeg.ts to perform this secure binary verification.
However, inside the loadFFmpeg() function, this security check is completely bypassed. The application ignores fetchWithIntegrity() and instead uses the insecure toBlobURL() function directly on the core and wasm URLs, nullifying the security check.
Expected Behavior
The FFmpeg core files should be loaded using fetchWithIntegrity() so that their hashes are validated against SRI_HASHES prior to converting them to Blob URLs and executing them. This ensures that tampered or compromised WebAssembly files cannot be executed.
Actual Behavior
The toBlobURL() function is used directly inside ffmpeg.load(), completely bypassing the integrity check implementation.
Steps to Reproduce / Code Location
Open src/lib/ffmpeg.ts
Observe fetchWithIntegrity() defined on line 16.
Scroll down to loadFFmpeg() (around line 75).
Notice that toBlobURL(coreURL, "text/javascript") is used directly instead of fetchWithIntegrity, rendering the security implementation dead code.
Security Impact
Bypassing SRI checks introduces a severe supply chain vulnerability. If the CDN or the server delivering the ffmpeg-core JavaScript or WebAssembly files is compromised, or if the network traffic is intercepted (MitM), the application will blindly load and execute malicious WASM code directly inside the user's browser environment.
Proposed Fix
Update loadFFmpeg() in src/lib/ffmpeg.ts to use fetchWithIntegrity for the files that have defined hashes:
awaitffmpeg.load({coreURL: awaitfetchWithIntegrity(coreURL,"text/javascript"),wasmURL: awaitfetchWithIntegrity(wasmURL,"application/wasm"),
...(workerURL&&{workerURL: awaittoBlobURL(workerURL,"text/javascript"),// Fallback to toBlobURL since worker has no hash defined}),},{ signal });
Hey @Abhishek2005-ard, this issue has been assigned to you! 🎉 Please make progress within 5 days or it will be automatically unassigned due to inactivity.
Hey @Abhishek2005-ard, just a friendly reminder that this issue has had no activity for 2 days. Please leave an update or let us know if you need help! ⏰
Hey @Abhishek2005-ard, final warning! ⚠️ This issue has had no activity for 4 days and will be automatically unassigned in 24 hours if there is no update.
Activity
github-actions commentedon Jun 14, 2026
👋 Thanks for opening an issue, @Abhishek2005-ard!
Our maintainers will review this shortly 🚀
Before you start working
For GSSoC'26 contributors
If you're contributing under GirlScript Summer of Code 2026, please mention it in your comment when requesting assignment:
Architecture notes
Reframe is a static Next.js app with
output: "export". Key points:headers()innext.config.tswon't work — usevercel.jsoninsteadnot-found.tsxrequirespublic/404.html+vercel.jsonroutes configHappy contributing! ⭐ Star the repo if you find it useful!
Abhishek2005-ard commentedon Jun 14, 2026
/assign
github-actions commentedon Jun 14, 2026
Hey @Abhishek2005-ard, this issue has been assigned to you! 🎉 Please make progress within 5 days or it will be automatically unassigned due to inactivity.
github-actions commentedon Jun 16, 2026
Hey @Abhishek2005-ard, just a friendly reminder that this issue has had no activity for 2 days. Please leave an update or let us know if you need help! ⏰
github-actions commentedon Jun 21, 2026
Hey @Abhishek2005-ard, final warning!⚠️ This issue has had no activity for 4 days and will be automatically unassigned in 24 hours if there is no update.
github-actions commentedon Jun 26, 2026
This issue has been unassigned from @Abhishek2005-ard due to 5 days of inactivity and is open for anyone to pick up — comment
/assignto claim it!