Vulnerabilities in pkg:pypi/icalendar

PACKAGE
Advisory Identifier: GHSA-cv84-9p8j-fj68
Advisory Summary

CVE-2026-55099 is a HIGH (CVSS 7.5) icalendar has algorithmic complexity vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Icalendar libraries in the PyPI ecosystem. The issue involves icalendar has algorithmic complexity in equality. Remediation is available by upgrading affected packages to version 7.1.3.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/icalendar

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/icalendar. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-cv84-9p8j-fj68 CVE-2026-55099 HIGH icalendar has Algorithmic Complexity in Equality

CVE-2026-55099 at a Glance

CVE Identifier CVE-2026-55099
GHSA Identifier GHSA-cv84-9p8j-fj68
Severity HIGH
CVSS v3.1 Base Score 7.5
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Icalendar
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 7.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2026-55099

To remediate this vulnerability, upgrade all affected Icalendar dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

icalendar fixed: 7.1.3
pip install icalendar>=7.1.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show icalendar

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-55099, inspect your installed packages using pip:

pip show icalendar

Analyze the terminal output to locate any version of Icalendar in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 7.1.3), your application is affected.

Note: The pip show icalendar command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Icalendar, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Summary `Component.__eq__` compares subcomponents in `O(2^n)` time relative to nesting depth. Because the parser accepts arbitrarily nested components, a sub-kilobyte `.ics` file is enough to make a single equality check run for minutes or hang indefinitely. Any application that compares parsed components (`==`, `!=`, `in`, set/dict membership, deduplication, test assertions) against attacker-supplied calendar data is exposed to denial of service. ### Details `Component` subclasses `dict` and stores children in a separate `subcomponents` list. `__eq__` (`src/icalendar/cal/component.py:642-665`) checks set-equivalence of children with two membership loops: ```python def __eq__(self, other): if len(self.subcomponents) != len(other.subcomponents): return False if not super().__eq__(other): return False for subcomponent in self.subcomponents: if subcomponent not in other.subcomponents: return False for subcomponent in other.subcomponents: if subcomponent not in self.subcomponents: return False return True ``` Each `... not in ...` test invokes `__eq__` on the children. For a nested chain, both loops descend the full subtree, so each level spawns two recursive comparisons: `T(n) = 2·T(n-1)` → `O(2^n)`. Parsing does not gate this. `Component.from_ical` builds the structure iteratively and imposes no depth limit, so `BEGIN:VEVENT` blocks can be nested to any depth (parsing the payload below is instant). The cost is paid only when a comparison occurs, and only when the operands are equal far enough down to keep both loops recursing, a condition the attacker controls by submitting equal subtrees. ### PoC ```python from icalendar import Calendar d = 26 event = b"BEGIN:VEVENT\r\n" * d + b"END:VEVENT\r\n" * d ics = b"BEGIN:VCALENDAR\r\n" + event + event + b"END:VCALENDAR\r\n" cal = Calendar.from_ical(ics) a, b = cal.subcomponents a == b ``` Measured on `icalendar` 7.1.x, CPython 3.14: | Payload | Depth | `==` time | |---|---|---| | 552 B | 20 | 0.76 s | | 656 B | 24 | 12 s | | 708 B | 26 | 48 s | | ~800 B | 30 | ~13 min | A single uploaded file supplies both operands (two identical nested events), so no second input is needed. The same blowup occurs in round-trip checks (`cal == Calendar.from_ical(cal.to_ical())`) and in any membership/dedup logic over subcomponents. ### Impact Algorithmic-complexity denial of service (CWE-407). Unauthenticated; a few hundred bytes of input pin a CPU core indefinitely. It affects any service that parses untrusted iCalendar data and then compares components for equality or membership, including calendar sync/import endpoints, invite processing, dedup, and round-trip/normalization checks. It is not triggered by parsing alone, and a comparison against an early-differing object short-circuits harmlessly, so impact is limited to code paths that perform such comparisons. ### Fix `Component.__eq__` rewritten to walk an explicit stack instead of recursing, matching each pair of nested components exactly once. Equality is now linear in the number of components and preserves the existing multiset equivalence and commutativity semantics.

CVE-2026-55099 Affected Icalendar Versions

1 component(s)
Fixed Versions:
7.1.3
Product / Package Ecosystem Affected Versions Fixed Version
icalendar
PyPI
≥ 7.1.0
< 7.1.3
7.1.3

References

Frequently Asked Questions

What is CVE-2026-55099?
CVE-2026-55099 is a security vulnerability in Icalendar involving icalendar has Algorithmic Complexity in Equality under CWE-400: Uncontrolled Resource Consumption.
Which Icalendar versions are affected?
Affected versions include releases prior to 7.1.3 across affected packages: icalendar.
What version fixes CVE-2026-55099?
Upgrading to 7.1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is icalendar affected?
Yes, icalendar is affected in releases prior to 7.1.3. Upgrade your dependency to 7.1.3 or later.
What is the CVSS score of CVE-2026-55099?
CVE-2026-55099 has a CVSS v3.1 base score of 7.5 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H.
What CWE is associated with CVE-2026-55099?
CVE-2026-55099 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check PyPI dependencies for CVE-2026-55099?
Run the dependency tree command: 'pip show icalendar'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-cv84-9p8j-fj68",
  "modified" : "2026-08-25T19:27:31Z",
  "published" : "2026-08-25T19:27:31Z",
  "aliases" : [ "CVE-2026-55099" ],
  "summary" : "icalendar has Algorithmic Complexity in Equality",
  "details" : "### Summary\n\n`Component.__eq__` compares subcomponents in `O(2^n)` time relative to nesting depth. Because the parser accepts arbitrarily nested components, a sub-kilobyte `.ics` file is enough to make a single equality check run for minutes or hang indefinitely. Any application that compares parsed components (`==`, `!=`, `in`, set/dict membership, deduplication, test assertions) against attacker-supplied calendar data is exposed to denial of service.\n\n### Details\n\n`Component` subclasses `dict` and stores children in a separate `subcomponents` list. `__eq__` (`src/icalendar/cal/component.py:642-665`) checks set-equivalence of children with two membership loops:\n\n```python\ndef __eq__(self, other):\n    if len(self.subcomponents) != len(other.subcomponents):\n        return False\n    if not super().__eq__(other):\n        return False\n    for subcomponent in self.subcomponents:\n        if subcomponent not in other.subcomponents:\n            return False\n    for subcomponent in other.subcomponents:\n        if subcomponent not in self.subcomponents:\n            return False\n    return True\n```\n\nEach `... not in ...` test invokes `__eq__` on the children. For a nested chain, both loops descend the full subtree, so each level spawns two recursive comparisons: `T(n) = 2·T(n-1)` → `O(2^n)`.\n\nParsing does not gate this. `Component.from_ical` builds the structure iteratively and imposes no depth limit, so `BEGIN:VEVENT` blocks can be nested to any depth (parsing the payload below is instant). The cost is paid only when a comparison occurs, and only when the operands are equal far enough down to keep both loops recursing, a condition the attacker controls by submitting equal subtrees.\n\n### PoC\n\n```python\nfrom icalendar import Calendar\n\nd = 26\nevent = b\"BEGIN:VEVENT\\r\\n\" * d + b\"END:VEVENT\\r\\n\" * d\nics = b\"BEGIN:VCALENDAR\\r\\n\" + event + event + b\"END:VCALENDAR\\r\\n\"\n\ncal = Calendar.from_ical(ics)\na, b = cal.subcomponents\na == b\n```\n\nMeasured on `icalendar` 7.1.x, CPython 3.14:\n\n| Payload | Depth | `==` time |\n|---|---|---|\n| 552 B | 20 | 0.76 s |\n| 656 B | 24 | 12 s |\n| 708 B | 26 | 48 s |\n| ~800 B | 30 | ~13 min |\n\nA single uploaded file supplies both operands (two identical nested events), so no second input is needed. The same blowup occurs in round-trip checks (`cal == Calendar.from_ical(cal.to_ical())`) and in any membership/dedup logic over subcomponents.\n\n### Impact\n\nAlgorithmic-complexity denial of service (CWE-407). Unauthenticated; a few hundred bytes of input pin a CPU core indefinitely. It affects any service that parses untrusted iCalendar data and then compares components for equality or membership, including calendar sync/import endpoints, invite processing, dedup, and round-trip/normalization checks. It is not triggered by parsing alone, and a comparison against an early-differing object short-circuits harmlessly, so impact is limited to code paths that perform such comparisons.\n\n### Fix\n\n`Component.__eq__` rewritten to walk an explicit stack instead of recursing, matching each pair of nested components exactly once. Equality is now linear in the number of components and preserves the existing multiset equivalence and commutativity semantics.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "icalendar"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "7.1.0"
      }, {
        "fixed" : "7.1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/collective/icalendar/security/advisories/GHSA-cv84-9p8j-fj68"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/collective/icalendar/commit/b6b2608ae3af6de40695b4e40f71847485aa0b49"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/collective/icalendar/commit/cad40cd112c93fd142ec12cc5b37445a849b8a79"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/collective/icalendar"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/collective/icalendar/releases/tag/v7.1.3"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-407" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-08-25T19:27:31Z",
    "nvd_published_at" : null
  }
}