USN-9148-1: Mechanize vulnerability

Publication date

17 November 2026

Overview

Mechanize could be made to run programs if it received specially crafted input.


Packages

  • ruby-mechanize - library used for automating interaction with websites

Details

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.

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.

Update instructions

In general, a standard system update will make all the necessary changes.

Learn more about how to get the fixes.

The problem can be corrected by updating your system to the following package versions:

Ubuntu Release Package Version
20.04 LTS focal ruby-mechanize –  2.7.6-1ubuntu0.1~esm1  
18.04 LTS bionic ruby-mechanize –  2.7.5-2ubuntu0.1~esm1  
16.04 LTS xenial ruby-mechanize –  2.7.3-1ubuntu0.1~esm1

Reduce your security exposure

Ubuntu Pro provides ten-year security coverage to 25,000+ packages in Main and Universe repositories, and it is free for up to five machines.


Have additional questions?

Talk to a member of the team ›