Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Full title: Ruby Gem Karteek Docsplit 0.5.4 Command Injection Vulnerability
- Date add: 2013-04-11
- Category: web applications
- Platform: windows
- Description:
- Ruby Gem Karteek versión 0.5.4 Docsplit no desinfectar suministrado por el usuario de entrada. Si un usuario es engañado para extraer un archivo con caracteres de shell en el nombre, el código se puede ejecutar de forma remota.
- --------------------------------------------------------------------------
- Remote Command Injection Ruby Gem Karteek Docsplit 0.5.4
- Larry W. Cashdollar
- Entrada proporcionada por el usuario no está desinfectado contra metacaracteres de shell y se alimenta directamente a la cáscara. Si el usuario es engañado para extraer un archivo con caracteres de shell en el nombre de código se puede ejecutar remotamente.
- https://rubygems.org/gems/karteek-docsplit
- ./karteek-docsplit-0.5.4/lib/docsplit/text_extractor.rb
- def extract_from_ocr(pdf, pages)
- tempdir = Dir.mktmpdir
- base_path = File.join(@output, @pdf_name)
- if pages
- pages.each do |page|
- tiff = "{tempdir}/{@pdf_name}{page}.tif"
- file = "{basepath}{page}"
- run "MAGICKTMPDIR={tempdir} OMP_NUM_THREADS=2 gm convert -despeckle +adjoin #{MEMORY_ARGS} #{OCR_FLAGS} {pdf}[{page - 1}] #{tiff} 2>&1"
- run "tesseract #{tiff} {file} -l eng 2>&1"
- clean_text(file + '.txt') if @clean_ocr
- FileUtils.remove_entry_secure tiff
- end
- else
- tiff = "{tempdir}/{@pdf_name}.tif"
- run "MAGICK_TMPDIR={tempdir} OMP_NUM_THREADS=2 gm convert -despeckle #{MEMORY_ARGS} #{OCR_FLAGS} #{pdf} #{tiff} 2>&1"
- run "tesseract #{tiff} #{base_path} -l eng 2>&1"
- clean_text(base_path + '.txt') if @clean_ocr
- end
- Run is defined as:
- def run(command)
- result = `#{command}`
- raise ExtractionFailed, result if $? != 0
- result
- end
- Esta vulnerabilidad se le ha asignado CVE-2013-1933.
- http://vapid.dhs.org/advisories/karteek-docsplit-cmd-inject.html
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement