Description
amazing-print/amazing_print at commit dc890dfafdf07088ea901df53c19c2710e5c5234 contains a Ruby code injection condition in AwesomeMethodArray#grep. A specially named method containing Ruby interpolation syntax can be interpolated into a dynamically constructed eval string when grep is called with a block, resulting in Ruby code execution in the host process. Exploitation requires an application path that allows an attacker to influence dynamic method names.
Published: 2026-08-13
Score: 8.4 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerability exists in the awesome method array helper of a Ruby printing library. A specially named method that contains Ruby interpolation syntax can be resolved into an interpolated string when the grep method is called with a block. The resulting string is then evaluated with eval, allowing any Ruby code contained in the method name to be executed in the host process. This is a classic code injection flaw where an attacker can run arbitrary code if they can control the method name. The impact is local code execution in the context of the application using the library, potentially leading to full system compromise if the host process runs with privileged rights.

Affected Systems

The affected product is the Ruby gem amazing-print, version at commit dc890dfafdf07088ea901df53c19c2710e5c5234. No other vendors or product versions are listed in the advisory, so only this specific gem is known to be vulnerable.

Risk and Exploitability

A CVSS score of 8.4 indicates high severity, and EPSS is not available; the vulnerability is not listed in CISA’s KEV catalog. The attack vector requires an attacker to be able to influence the name of a method that the application will dynamically refer to; this may be possible in applications that allow user‑supplied or configuration‑driven method names. Because the flaw relies on a dynamic eval, exploitation is only feasible when the attacker can provide a method name that includes interpolated Ruby code. The lack of publicly available metrics suggests that the overall risk is uncertain, but the potential for arbitrary code execution in a process that may have elevated privileges is high once the conditions are met.

Generated by OpenCVE AI on August 13, 2026 at 18:16 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to a later version of the amazing-print gem where the eval condition has been removed or guarded against interpolation
  • If an upgrade is not possible, patch the library by removing the dynamic eval statement in AwesomeMethodArray#grep or adding validation to reject interpolated method names
  • Audit all application code that passes user‑controlled strings to AwesomeMethodArray#grep and enforce strong input validation or replace usage with safer alternatives

Generated by OpenCVE AI on August 13, 2026 at 18:16 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 00:15:00 +0000

Type Values Removed Values Added
Title Arbitrary Ruby Code Execution via Dynamic eval in amazing_print's AwesomeMethodArray#grep amazing_print: amazing_print: Arbitrary code execution via Ruby code injection in AwesomeMethodArray#grep
References
Metrics threat_severity

None

threat_severity

Important


Thu, 13 Aug 2026 18:45:00 +0000

Type Values Removed Values Added
Title Arbitrary Ruby Code Execution via Dynamic eval in amazing_print's AwesomeMethodArray#grep

Thu, 13 Aug 2026 16:30:00 +0000

Type Values Removed Values Added
Weaknesses CWE-94
Metrics cvssV3_1

{'score': 8.4, 'vector': 'CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}


Thu, 13 Aug 2026 14:00:00 +0000

Type Values Removed Values Added
Description amazing-print/amazing_print at commit dc890dfafdf07088ea901df53c19c2710e5c5234 contains a Ruby code injection condition in AwesomeMethodArray#grep. A specially named method containing Ruby interpolation syntax can be interpolated into a dynamically constructed eval string when grep is called with a block, resulting in Ruby code execution in the host process. Exploitation requires an application path that allows an attacker to influence dynamic method names.
References

Subscriptions

No data.

cve-icon MITRE

Status: PUBLISHED

Assigner: mitre

Published:

Updated: 2026-08-13T15:48:55.258Z

Reserved: 2026-07-30T00:00:00.000Z

Link: CVE-2026-67986

cve-icon Vulnrichment

Updated: 2026-08-13T15:48:41.319Z

cve-icon NVD

Status : Received

Published: 2026-08-13T14:17:11.440

Modified: 2026-08-13T16:18:48.530

Link: CVE-2026-67986

cve-icon Redhat

Severity : Important

Publid Date: 2026-08-13T00:00:00Z

Links: CVE-2026-67986 - Bugzilla

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T18:30:16Z

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')