Vulnerability · Published Jul 5, 2023 · Assigned by GitHub_M

CVE-2023-34457MechanicalSoup vulnerable to malicious web server reading arbitrary files on client using file input inside HTML form

Medium 5.9

In plain English

A medium-severity improper input validation in MechanicalSoup from MechanicalSoup. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 1.1% (higher than 65% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)5.9Medium
Exploit odds (30 days)1.1%top 34.7% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

MechanicalSoup is a Python library for automating interaction with websites. Starting in version 0.2.0 and prior to version 1.3.0, a malicious web server can read arbitrary files on the client using a `<input type="file" ...>` inside HTML form. All users of MechanicalSoup's form submission are affected, unless they took very specific (and manual) steps to reset HTML form field values. Version 1.3.0 contains a patch for this issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12python-mechanicalsoupno fix listedDEBIAN-CVE-2023-34457
Debian:13python-mechanicalsoup1.3.0-1DEBIAN-CVE-2023-34457
Debian:14python-mechanicalsoup1.3.0-1DEBIAN-CVE-2023-34457
PyPImechanicalsoup1.3.0GHSA-x456-3ccm-m6j4
PyPImechanicalsoup1.3.0PYSEC-2023-108
Ubuntu:22.04:LTSpython-mechanicalsoupno fix listedUBUNTU-CVE-2023-34457
Ubuntu:24.04:LTSpython-mechanicalsoupno fix listedUBUNTU-CVE-2023-34457
Ubuntu:25.10python-mechanicalsoupno fix listedUBUNTU-CVE-2023-34457
Ubuntu:26.04:LTSpython-mechanicalsoupno fix listedUBUNTU-CVE-2023-34457
Ubuntu:26.10python-mechanicalsoupno fix listedUBUNTU-CVE-2023-34457

Affected products (as reported)

VendorProductVersions
MechanicalSoup MechanicalSoup >= 0.2.0, < 1.3.0

Weakness: CWE-20 · Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

References