Ruby Gem ldoce 0.0.2 Command Execution Vulnerability

ID 1337DAY-ID-20600
Type zdt
Reporter Larry Cashdollar
Modified 2013-04-02T00:00:00


Ruby Gem ldoce version 0.0.2 suffers from a command execution vulnerability.

                                            Remote command execution in Ruby Gem ldoce 0.0.2
Larry W. Cashdollar

Ldoce Ruby Gem:

Easily interface with the Longman Dictionary of Contemporary English API from Ruby:

NB currently mac only as it depends on the afplay command.

Ldoce passes an mp3 url to commandline for audio output of the pronunciation of a dictonary word:

If the URL or filename for the mp3 files contain shell metacharacters code can be executed remotely as the client:


      if mp3?
        unless File.exists? filename
          command = "curl #{mp3_url} -silent > {filename}"
        `afplay #{filename}`

# [2018-03-06]  #