VDB
Sign up
MEDIUM5.4

GHSA-x562-297c-g43g

Electron: Pointer lock permission requests can be attributed to the wrong frame

Quick fix

GHSA-x562-297c-g43g — electron: upgrade to the fixed version with the command below.

npm install electron@45.0.0-alpha.13

Details

### Impact For `pointerLock` permission requests made from some cross-origin iframes, `session.setPermissionRequestHandler()` was given the top-level frame's `requestingUrl` and `isMainFrame` instead of the requesting frame's. Apps that grant pointer lock based on the requesting origin could grant it to embedded content under the top-level page's identity.

Apps are only affected if they embed untrusted content in iframes and decide `pointerLock` requests by origin in `setPermissionRequestHandler`. Apps that do not embed untrusted content, or that deny `pointerLock` for it, are not affected.

### Workarounds Deny the `pointerLock` permission for web contents that embed untrusted frames.

### Fixed Versions * `45.0.0-alpha.13` * `44.5.0` * `43.7.6` * `42.11.9`

### For more information If you have any questions or comments about this advisory, email us at [security@electronjs.org](mailto:security@electronjs.org)

Are you affected?

Enter the version of the package you're using.

Affected packages

npm/electron
Introduced in: 45.0.0-alpha.1Fixed in: 45.0.0-alpha.13
Fixnpm install electron@45.0.0-alpha.13
npm/electron
Introduced in: 44.0.0-alpha.1Fixed in: 44.5.0
Fixnpm install electron@44.5.0
npm/electron
Introduced in: 43.0.0-alpha.1Fixed in: 43.7.6
Fixnpm install electron@43.7.6
npm/electron
Introduced in: 0Fixed in: 42.11.9
Fixnpm install electron@42.11.9

References

Check it before you install it

One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.

curl -s https://vdb.ai.kr/v1/ai/check-packages \
  -H 'Content-Type: application/json' \
  -d '{"packages":["pkg:npm/electron"]}'