Lucene search
+L

Ruby Gem Arabic Prawn 0.0.1 Command Injection Vulnerability

🗓️ 13 Mar 2014 00:00:00Reported by Larry CashdollarType 
zdt
 zdt
🔗 0day.today👁 63 Views

Remote Command Injection in Arabic Prawn 0.0.1 Ruby Gem. Unsantized input in string_utf_support.rb allows shell command injection

Related
Code
ReporterTitlePublishedViews
Family
cve
CVE
CVE-2014-2322
2 May 201414:00
–cve
cvelist
Cvelist
CVE-2014-2322
2 May 201414:00
–cvelist
euvd
EUVD
EUVD-2017-0250
7 Oct 202500:30
–euvd
github
Github Security Blog
Arabic Prawn allows remote attackers to execute arbitrary commands via shell metacharacters
24 Oct 201718:33
–github
gitlab
GitLab Advisory Database
Remote Command Injection
2 May 201400:00
–gitlab
mend
Mend
CVE-2014-2322
2 May 201414:00
–mend
nvd
NVD
CVE-2014-2322
2 May 201414:55
–nvd
osv_ghsa
osv_ghsa
GHSA-HGMW-X865-HF9X Arabic Prawn allows remote attackers to execute arbitrary commands via shell metacharacters
24 Oct 201718:33
–osv_ghsa
packetstorm
Packet Storm
Ruby Gem Arabic Prawn 0.0.1 Command Injection
12 Mar 201400:00
–packetstorm
prion
Prion
Code injection
2 May 201414:55
–prion
Rows per page
Title: Remote Command Injection in Arabic Prawn 0.0.1 Ruby Gem

Author: Larry W. Cashdollar, @_larry0

Download Site: http://rubygems.org/gems/Arabic-Prawn

CVE: 2014-2322
Date: 12/17/2013

In Arabic-Prawn-0.0.1/lib/string_utf_support.rb, the following lines pass unsanitized input to the shell.

426 var = %x{ /usr/bin/curl -I -L --fail --silent --connect-timeout #{seconds} --max-time #{seconds+10} #{url}; /bin/echo -n $? }.to_i 
427

428             #return false unless var == 0
429             raise "Failed to create connection to web site: #{url}  --  curl error code: #{var}  --  " unless var     == 0
430 
431             str = %x{ /usr/bin/curl -L --fail --silent --connect-timeout #{seconds} --max-time #{seconds+10} #{url} | \
432                       /usr/bin/grep -Eo -m 1 \"(charset|encoding)=[\\"']?[^\\"'>]+\" | /usr/bin/grep -Eo \"[^=\\"    '>]+$\" }

443             %x{ /usr/bin/touch #{downloaded_file} 2>/dev/null }
444             raise "No valid HTML download file (path) specified!" unless File.file?(downloaded_file)
445             %x{ /usr/bin/curl -L --fail --silent --connect-timeout #{seconds} --max-time #{seconds+10} -o #{downloaded_file} #{url} }
446 
447             simple_test = %x{ /usr/bin/file -ik #{downloaded_file} }    #  cf. man file

If the downloaded file name #{downloaded_file} or #{url} contains any shell meta characters like ';' a malicious user can inject shell commands.

PoC
myfile;id;.txt

id would be passed to the command line and executed.

Advisory: http://www.vapid.dhs.org/advisories/arabic-ruby-gem.html

#  0day.today [2018-02-21]  #

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

13 Mar 2014 00:00Current
0.7Low risk
Vulners AI Score0.7
EPSS0.02188
63