id: node-integration-enabled

info:
  name: Electron Applications - Cross-Site Scripting & Remote Code Execution
  author: me9187
  severity: critical
  description: |
    Electron Applications is susceptible to remote code execution by way of cross-site scripting via nodeIntegration  by calling require('child_process').exec('COMMAND');.
  reference:
    - https://blog.yeswehack.com/yeswerhackers/exploitation/pentesting-electron-applications/
    - https://book.hacktricks.wiki/en/network-services-pentesting/pentesting-web/electron-desktop-apps/index.html#rce-xss--nodeintegration
  tags: electron,file,nodejs,xss

file:
  - extensions:
      - all
    matchers:
      - type: word
        words:
          - "nodeIntegration: true"
# digest: 4a0a00473045022074f2ab6fd9101377f1652a7f843122204eb287fde08fb7e1a0e40290b921801f022100f8150b68cef266ec7a07d754c2576a781e96e27b42aa78b6984898a621848276:922c64590222798bb761d5b6d8e72950