Ruby/icalendar/2.9.0


Implements the iCalendar specification (RFC-5545) in Ruby. This allows for the generation and parsing of .ics files, which are used by a variety of calendaring applications.

https://rubygems.org/gems/icalendar
BSD-2-Clause OR GPL-3.0-only OR icalendar

2 Security Vulnerabilities

iCalendar has ICS injection via unsanitized URI property values

Published date: 2026-03-24T19:13:41Z
CVE: CVE-2026-33635
Links:

Summary

.ics serialization does not properly sanitize URI property values, enabling ICS injection through attacker-controlled input, adding arbitrary calendar lines to the output.

Details

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)

Relevant code: - lib/icalendar/values/uri.rb:16

PoC

Run the following with the library loaded:

require "icalendar/value"
require "icalendar/values/uri"

v = Icalendar::Values::Uri.new("https://a.example/ok\r\nATTENDEE:mailto:evil@example.com")
puts v.to_ical(Icalendar::Values::Text)

output:

;VALUE=URI:https://a.example/ok
ATTENDEE:mailto:evil@example.com

Impact

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.

Fix

Reject raw CR and LF characters in URI-typed values before serialization, or escape/encode them so they cannot terminate the current ICS content line.

Affected versions: ["2.12.1", "2.12.0", "2.11.2", "2.11.1", "2.11.0", "2.10.3", "2.10.2", "2.10.1", "2.10.0", "2.9.0", "2.8.0", "2.7.1", "2.7.0", "2.6.1", "2.6.0", "2.5.3", "2.5.2", "2.5.1", "2.5.0", "2.4.1", "2.4.0", "2.3.0", "2.2.2", "2.2.1", "2.2.0", "2.1.2", "2.1.1", "2.1.0", "2.0.1", "2.0.0"]
Secure versions: [0.95, 0.96, 0.96.1, 0.96.2, 0.96.3, 0.96.4, 0.97, 0.98, 1.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 2.0.0.beta.1, 2.0.0.beta.2, 2.12.2, 2.12.3, 2.12.4, 2.12.5, 2.13.0]
Recommendation: Update to version 2.13.0.

iCalendar has ICS injection via unsanitized URI property values

Published date: 2026-03-24
CVE: 2026-33635
CVSS V3: 4.3
Links:

Summary

.ics serialization does not properly sanitize URI property values, enabling ICS injection through attacker-controlled input, adding arbitrary calendar lines to the output.

Details

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)

Relevant code: - lib/icalendar/values/uri.rb:16

Impact

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.

Fix

Reject raw CR and LF characters in URI-typed values before serialization, or escape/encode them so they cannot terminate the current ICS content line.

Affected versions: ["2.2.2", "2.2.0", "2.5.2", "2.1.2", "2.5.0", "2.3.0", "2.7.0", "2.2.1", "2.1.1", "2.5.3", "2.0.0", "2.1.0", "2.4.1", "2.6.0", "2.0.1", "2.4.0", "2.6.1", "2.5.1", "2.7.1", "2.8.0", "2.9.0", "2.10.0", "2.10.1", "2.10.2", "2.10.3", "2.11.0", "2.11.1", "2.11.2", "2.12.0", "2.12.1"]
Secure versions: [0.95, 0.96, 0.96.1, 0.96.2, 0.96.3, 0.96.4, 0.97, 0.98, 1.0, 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.3.0, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 2.0.0.beta.1, 2.0.0.beta.2, 2.12.2, 2.12.3, 2.12.4, 2.12.5, 2.13.0]
Recommendation: Update to version 2.13.0.

73 Other Versions

Version License Security Released
2.13.0 BSD-2-Clause OR GPL-3.0-only OR icalendar 2026-10-11 - 23:25 5 days
2.12.5 BSD-2-Clause OR GPL-3.0-only OR icalendar 2026-09-25 - 19:21 21 days
2.12.4 BSD-2-Clause OR GPL-3.0-only OR icalendar 2026-07-31 - 13:48 3 months
2.12.3 BSD-2-Clause OR GPL-3.0-only OR icalendar 2026-05-13 - 23:29 5 months
2.12.2 BSD-2-Clause OR GPL-3.0-only OR icalendar 2026-03-21 - 20:06 7 months
2.12.1 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2025-10-19 - 13:53 12 months
2.12.0 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2025-09-26 - 12:52 about 1 year
2.11.2 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2025-06-21 - 13:40 over 1 year
2.11.1 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2025-06-06 - 15:42 over 1 year
2.11.0 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2025-04-12 - 16:44 over 1 year
2.10.3 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2024-09-21 - 16:31 about 2 years
2.10.2 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2024-07-21 - 16:46 about 2 years
2.10.1 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2023-12-01 - 22:33 almost 3 years
2.10.0 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2023-11-01 - 22:24 almost 3 years
2.9.0 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2023-08-11 - 20:56 about 3 years
2.8.0 BSD-2-Clause OR GPL-3.0-only OR icalendar 2 2022-07-11 - 01:57 over 4 years
2.7.1 UNKNOWN 2 2021-03-15 - 02:26 over 5 years
2.7.0 UNKNOWN 2 2020-09-12 - 17:36 about 6 years
2.6.1 UNKNOWN 2 2019-12-07 - 22:36 almost 7 years
2.6.0 UNKNOWN 2 2019-11-27 - 02:44 almost 7 years
2.5.3 UNKNOWN 2 2019-03-05 - 03:52 over 7 years
2.5.2 UNKNOWN 2 2018-12-08 - 16:35 almost 8 years
2.5.1 UNKNOWN 2 2018-10-30 - 20:27 almost 8 years
2.5.0 UNKNOWN 2 2018-09-10 - 20:37 about 8 years
2.4.1 UNKNOWN 2 2016-09-04 - 02:47 about 10 years
2.4.0 UNKNOWN 2 2016-07-05 - 00:42 over 10 years
2.3.0 UNKNOWN 2 2015-04-26 - 21:28 over 11 years
2.2.2 UNKNOWN 2 2014-12-27 - 16:51 almost 12 years
2.2.1 UNKNOWN 2 2014-12-04 - 00:24 almost 12 years
2.2.0 UNKNOWN 2 2014-09-24 - 01:06 about 12 years
2.1.2 UNKNOWN 2 2014-09-10 - 13:40 about 12 years
2.1.1 UNKNOWN 2 2014-07-24 - 02:13 about 12 years
2.1.0 UNKNOWN 2 2014-06-17 - 22:36 over 12 years
2.0.1 UNKNOWN 2 2014-04-27 - 23:53 over 12 years
2.0.0 UNKNOWN 2 2014-04-23 - 02:07 over 12 years
2.0.0.beta.2 UNKNOWN 2014-04-11 - 19:28 over 12 years
2.0.0.beta.1 UNKNOWN 2014-03-30 - 20:32 over 12 years
1.5.4 UNKNOWN 2014-04-27 - 23:42 over 12 years
1.5.3 UNKNOWN 2014-04-20 - 17:35 over 12 years
1.5.2 UNKNOWN 2014-03-22 - 17:48 over 12 years
1.5.1 UNKNOWN 2014-02-28 - 02:36 over 12 years
1.5.0 UNKNOWN 2013-12-07 - 00:52 almost 13 years
1.4.5 UNKNOWN 2013-11-14 - 19:46 almost 13 years
1.4.4 UNKNOWN 2013-11-06 - 04:11 almost 13 years
1.4.3 UNKNOWN 2013-09-18 - 20:09 about 13 years
1.4.2 UNKNOWN 2013-09-11 - 04:51 about 13 years
1.4.1 UNKNOWN 2013-06-26 - 00:48 over 13 years
1.4.0 UNKNOWN 2013-05-22 - 00:23 over 13 years
1.3.0 UNKNOWN 2013-04-01 - 02:46 over 13 years
1.2.4 UNKNOWN 2013-03-30 - 19:53 over 13 years