CVE-2026-77399
Unbounded CPU/memory usage via crafted VALARM REPEAT in icalendar.
- CVSS 6.5
- CWE-400
- Resource Management
- Remote
icalendar is an RFC 5545 compatible parser and generator of iCalendar files for Python. From 6.1.0 until 7.2.2, vInt.from_ical accepts an attacker-controlled VALARM REPEAT value and applications that request alarm times can eagerly expand it without an application-level limit. Alarms.times and Alarms.active reach the unbounded expansion in versions starting with 6.1.0, while Alarm.triggers adds a second affected path starting with 7.0.0. Parsing alone does not trigger the issue, but accessing these properties can consume excessive CPU time and heap memory and terminate or stall a service. This issue is fixed in version 7.2.2.
- CWE
- CWE-400
- CVSS base score
- 6.5
- Published
- 2026-09-22
- OWASP
- A04 Insecure Design
- Orthogonal defect classification
- Timing/Serialization
- Code defect classification
- Timing Issues
- Category
- Resource Management
- Subcategory
- Resource Exhaustion
- Accessibility scope
- Remote
- Impact
- Denial of Service (DoS)
- Affected component
- icalendar
- Fixed by upgrading
- Yes
Solution
Upgrade iCalendar to version 7.2.2 (or later).
Vulnerable code sample
import sys
from icalendar import Calendar, Alarm, vInt
def get_alarm_times(ics_data: bytes) -> list:
"""
Parse iCalendar data and return all alarm trigger datetimes.
"""
cal = Calendar.from_ical(ics_data)
times = []
for component in cal.walk():
if component.name == "VALARM":
# VULNERABLE: unbounded repeat expansion via Alarm.triggers
for trigger in component.triggers:
times.append(trigger.dt)
return timesPatched code sample
import sys
from icalendar import Calendar, Alarm, vInt
def get_alarm_times(ics_data: bytes) -> list:
"""
Parse iCalendar data and return all alarm trigger datetimes.
"""
cal = Calendar.from_ical(ics_data)
times = []
for component in cal.walk():
if component.name == "VALARM":
# FIX: limit repeat expansion to a safe maximum
max_repeat = 10
repeat = int(component.get('repeat', 0))
if repeat > max_repeat:
repeat = max_repeat
for i, trigger in enumerate(component.triggers):
if i >= repeat:
break
times.append(trigger.dt)
return timesPublished fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- Fix GHSA-qjcq-q7h7-r74v: cap VALARM REPEAT expansion (collective/icalendar)
src/icalendar/alarms.py,src/icalendar/alarms.py · Alarms.set_end,src/icalendar/alarms.py · Alarms.set_start,src/icalendar/alarms.py · Alarms._get_end_alarm_times,src/icalendar/alarms.py · Alarms._repeat,src/icalendar/cal/alarm.py,src/icalendar/cal/alarm.py · Alarm.triggers,src/icalendar/prop/integer.py,src/icalendar/prop/integer.py · vInt.from_ical,src/icalendar/prop/integer.py · vInt.from_jcal,src/icalendar/prop/integer.py · vInt.parse_jcal_value
Cite this entry
@misc{vaitp:cve202677399,
title = {{Unbounded CPU/memory usage via crafted VALARM REPEAT in icalendar.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-77399},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-77399/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
