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).

Exploitability

The vulnerability is easily exploitable by providing a specially crafted payload that includes command chaining (using semicolons) when creating a PDF::Info object. For example, an attacker can inject a reverse shell command that would execute when the metadata method is called (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-71847HIGH8.7
  • Ruby logoRuby
  • ruby3.2-rails-8.1
NoYesAug 07, 2026
CVE-2026-45414HIGH8.5
  • Ruby logoRuby
  • decidim
NoYesAug 06, 2026
CVE-2026-45573MEDIUM6.4
  • Ruby logoRuby
  • decidim-core
NoYesAug 06, 2026
CVE-2026-45415MEDIUM6
  • Ruby logoRuby
  • decidim-verifications
NoYesAug 06, 2026
CVE-2026-45572MEDIUM4.8
  • Ruby logoRuby
  • decidim-core
NoYesAug 06, 2026

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