CVE-2022-36231
Ruby vulnerability analysis and mitigation

Overview

The pdf_info Ruby gem version 0.5.3 and earlier contains a Command Execution vulnerability (CVE-2022-36231). The vulnerability exists because the Ruby code uses backticks instead of Open3 for command execution, allowing attackers to inject and execute arbitrary system commands (GitHub CVE, MITRE CVE).

Technical details

The vulnerability stems from improper validation in the PDF::Info object initialization and metadata processing. When creating a new PDF::Info object, no validation is performed on the user-provided path. The command method uses backticks for system command execution without sanitizing the @pdf_path variable, allowing command chaining through semicolons to execute arbitrary commands (GitHub CVE).

Impact

An attacker can exploit this vulnerability to execute arbitrary operating system commands in the context of the application running the pdf_info gem. This could lead to complete system compromise depending on the application's privileges (GitHub CVE).

Mitigation and workarounds

The vulnerability has been fixed by replacing the backtick command execution with Open3, which provides safer command execution functionality. Users should upgrade to a patched version of the gem. A pull request implementing this fix was merged into the main repository (GitHub PR).

Additional resources


SourceThis report was generated using AI

Related Ruby vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-22589HIGH7.5
  • RubyRuby
  • spree_core
NoYesJan 10, 2026
GHSA-96qw-h329-v5rgHIGH7.5
  • JavaScriptJavaScript
  • shakapacker
NoYesJan 08, 2026
CVE-2026-22588MEDIUM6.5
  • RubyRuby
  • spree_api
NoYesJan 08, 2026
GHSA-g9jg-w8vm-g96vMEDIUM4.6
  • JavaScriptJavaScript
  • action_text-trix
NoYesDec 31, 2025
CVE-2025-61594LOW2.7
  • RubyRuby
  • ruby:3.3::rubygem-mongo-doc
NoYesDec 30, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management