We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vulnerability][demo][acl] Workers from blob URLs are not hooked
Worker
SharedWorker
blob:
let blob = new Blob([` onmessage = (event) => { caches.keys().then(keys => postMessage(keys[0])); } `], { type: 'text/javascript' }); let blobUrl = URL.createObjectURL(blob); let worker = new Worker(blobUrl); worker.addEventListener('message', function onMessage(event) { console.log('web-worker-client.js: received message', event.data); chai.assert.isOk(event.data.startsWith('version_'), 'blob worker result'); }); let message = []; console.log('web-worker-client.js: posting message ', JSON.stringify(message)); worker.postMessage(message);
data:
Worker: { [S_OBJECT]: { [S_DEFAULT]: '---', '@worker_manipulator': function _WorkerAcl(normalizedThisArg, normalizedArgs /* ['property', args], ['property', value], etc. */, aclArgs /* [name, isStatic, isObject, property, opType, context] */, hookArgs /* [f, thisArg, args, context, newTarget] */, applyAcl /* for recursive application of ACL */) { let opType = aclArgs[4]; if (opType === 'x') { let url = normalizedArgs[0].trim().toLowerCase(); if (url.startsWith('blob:') || url.startsWith('data:')) { return false; } } return '--x'[opTypeMap[opType]] === opType; // equivalent to '--x' acl }, }, [S_DEFAULT]: '---', [S_ALL]: '---', [S_PROTOTYPE]: { [S_DEFAULT]: '---', [S_ALL]: '---', [S_INSTANCE]: { [S_DEFAULT]: '---', '@worker_manipulator': 'rwx', }, }, }, SharedWorker: { [S_OBJECT]: { [S_DEFAULT]: '---', '@shared_worker_manipulator': function _WorkerAcl(normalizedThisArg, normalizedArgs /* ['property', args], ['property', value], etc. */, aclArgs /* [name, isStatic, isObject, property, opType, context] */, hookArgs /* [f, thisArg, args, context, newTarget] */, applyAcl /* for recursive application of ACL */) { let opType = aclArgs[4]; if (opType === 'x') { let url = normalizedArgs[0].trim().toLowerCase(); if (url.startsWith('blob:') || url.startsWith('data:')) { return false; } } return '--x'[opTypeMap[opType]] === opType; // equivalent to '--x' acl }, }, [S_DEFAULT]: '---', [S_ALL]: '---', [S_PROTOTYPE]: { [S_DEFAULT]: '---', [S_ALL]: '---', [S_INSTANCE]: { [S_DEFAULT]: '---', '@shared_worker_manipulator': 'rwx', }, }, },
The text was updated successfully, but these errors were encountered:
[demo][acl] Rebuild with Fix #249. Block blob: and data: URLs for Wor…
425d08f
…ker/SharedWorker
7e6ff28
0.0.239 with vulnerability Fix #249 Block blob: URL for Worker
c0edac5
No branches or pull requests
[vulnerability][demo][acl] Workers from blob URLs are not hooked
Root Cause
Worker
/SharedWorker
constructor arguments againstblob:
URLsNotes
blob:
worker scriptsReproducible Code Example
ACLs to block
blob:
anddata:
URLs forWorker
/SharedWorker
The text was updated successfully, but these errors were encountered: