Skip to content

Potential Quadratic Complexity Vulnerabilities in the email Module #136063

Open
@kexinoh

Description

@kexinoh

Bug Description:
A series of simple quadratic complexity vulnerabilities has been identified in the email package. After confirmation by CPython's security team, these low-threat DOS vulnerabilities can be fixed with community assistance.

Vulnerability Locations (All Fixed):

  1. def _parseparam(s):

    2.
    def get_phrase(value):

    3.
    while value and (value[0]=='\\' or value[0] not in PHRASE_ENDS):

    4.
    value = value[1:]

    5.
    value = value[1:]

    6.
    value = value[1:]

    7.
    value = value[1:]

    8.
    value = value[1:]

    9.
    value = value[1:]

    10.
    value = value[1:]

    11.
    value = value[1:]

    12.
    value = value[1:]

    13.
    value = value[1:]

    14.
    to_encode = to_encode[1:]

Repair Status:

Common Information:

  • CPython Version: main branch
  • Operating System: Linux
  • Credits: Finder is kexinoh (Xiangfan Wu) from QI-ANXIN Technology Research Institute.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixes3.13bugs and security fixes3.14bugs and security fixes3.15new features, bugs and security fixes3.9only security fixesstdlibPython modules in the Lib dirtopic-emailtype-securityA security issue

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions