PyPi: Mechanicalsoup

CVE-2023-34457

Safety vulnerability ID: 59307

This vulnerability was reviewed by experts

The information on this page was manually curated by our Cybersecurity Intelligence Team.

Created at Jul 05, 2023 Updated at Jun 02, 2025
Scan your Python projects for vulnerabilities →

Advisory

[This advisory has been limited. Please create a free account to view the full advisory.]

Affected package

mechanicalsoup

Latest version: 1.4.0

A Python library for automating interaction with websites

Affected versions

[This affected versions has been limited. Please create a free account to view the full affected versions.]

Fixed versions

[This fixed versions has been limited. Please create a free account to view the full fixed versions.]

Vulnerability changelog

===========

Breaking changes
----------------

* To prevent malicious web servers from reading arbitrary files from the
client, files must now be opened explicitly by the user in order to
upload their contents in form submission. For example, instead of:

browser["upload"] = "/path/to/file"

you would now use:

browser["upload"] = open("/path/to/file", "rb")

This remediates
`CVE-2023-34457 <https://github.com/MechanicalSoup/MechanicalSoup/security/advisories/GHSA-x456-3ccm-m6j4>`__.
Our thanks to e-c-d for reporting and helping to fix the vulnerability!

Main changes
------------

* Added support for Python 3.11.

* Allow submitting a form with no submit element. This can be achieved by
passing ``submit=False`` to ``StatefulBrowser.submit_selected``. Thanks
alexreg!
[`480 <https://github.com/MechanicalSoup/MechanicalSoup/pull/411`__]

Resources

Use this package?

Scan your Python project for dependency vulnerabilities in two minutes

Scan your application

Severity Details

CVSS Base Score

HIGH 7.5

CVSS v3 Details

HIGH 7.5
Attack Vector (AV)
NETWORK
Attack Complexity (AC)
LOW
Privileges Required (PR)
NONE
User Interaction (UI)
NONE
Scope (S)
UNCHANGED
Confidentiality Impact (C)
HIGH
Integrity Impact (I)
NONE
Availability Availability (A)
NONE