USN-9148-1: Mechanize vulnerability

Published Nov 17, 2026
·
Updated

It was discovered that Mechanize used Kernel#open to open local files in several methods. If an application passed untrusted input as a local file name to one of these methods, an attacker could possibly use this issue to execute arbitrary commands.

Affected Software

6 affected componentsFixes available
All of the following
ubuntu/ruby-mechanize<Ubuntu Pro
Ubuntu Pro
Ubuntu Ubuntu=20.04
All of the following
ubuntu/ruby-mechanize<Ubuntu Pro
Ubuntu Pro
Ubuntu Ubuntu=18.04
All of the following
ubuntu/ruby-mechanize<2.7.3-1ubuntu0.1~esm1
2.7.3-1ubuntu0.1~esm1
Ubuntu Ubuntu=16.04

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade ubuntu/ruby-mechanize to a version that resolves this vulnerability.

    Fixed in Ubuntu Pro
  2. Upgrade

    Upgrade ubuntu/ruby-mechanize to a version that resolves this vulnerability.

    Fixed in 2.7.3-1ubuntu0.1~esm1

Event History

Nov 17, 2026
Advisory Published
via Ubuntu·12:00 AM
Data Sourced
via Ubuntu·12:00 AM
DescriptionAffected Software

Child vulnerabilities

Contains the following vulnerabilities.

Frequently Asked Questions

1

What conditions are required for exploitation?

An application must pass attacker-controlled input as a local file name to one of the affected Mechanize methods. The issue may then allow the attacker to execute arbitrary commands.

2

Which deployments are exposed?

Ubuntu systems using the ruby-mechanize package may be exposed if their applications use the affected local-file handling methods with untrusted file-name input.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203