漏洞标题
Windows系统中默认的mimetype已知文件可写
漏洞描述信息
在CPython标准库模块“mimetypes”中存在一个缺陷,即在Windows系统上,默认的已知文件位置列表是可写的,这意味着其他用户可以创建无效文件,导致Python运行时启动时引发MemoryError,或者将文件扩展名解释为不正确的文件类型。
该缺陷的原因是在Windows系统上使用了Linux和macOS平台的默认位置(例如“/etc/mime.types”),这些位置在Windows上是用户可写的(“C:\etc\mime.types”)。
为解决该问题,用户可以在Windows平台上调用mimetypes.init()并传入一个空列表(“[]”),以避免使用默认的已知文件位置列表。
CVSS信息
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
漏洞类别
输入验证不恰当
漏洞标题
Default mimetype known files writeable on Windows
漏洞描述信息
There is a defect in the CPython standard library module “mimetypes” where on Windows the default list of known file locations are writable meaning other users can create invalid files to cause MemoryError to be raised on Python runtime startup or have file extensions be interpreted as the incorrect file type.
This defect is caused by the default locations of Linux and macOS platforms (such as “/etc/mime.types”) also being used on Windows, where they are user-writable locations (“C:\etc\mime.types”).
To work-around this issue a user can call mimetypes.init() with an empty list (“[]”) on Windows platforms to avoid using the default list of known file locations.
CVSS信息
N/A
漏洞类别
不可信的搜索路径