CVE-2026-33635: iCalendar ICS Injection via Unsanitized URI Property Values
Summary
CVE-2026-33635: iCalendar has ICS injection via unsanitized URI property values. Affects icalendar versions >= 2.0.0, < 2.12.2. Fixed in 2.12.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The iCalendar package is a Ruby library designed for generating and parsing iCalendar files (.ics), which are widely used for sharing calendar information. This package allows developers to create calendar events programmatically, making it easier to integrate scheduling features into applications. However, a vulnerability has been identified that allows for ICS injection through unsanitized URI property values, potentially compromising the integrity of calendar data.
Vulnerability Detail
The vulnerability arises from the improper sanitization of URI property values within the iCalendar package. Specifically, when the URI.parse method fails, the library falls back to using the raw input string without removing or escaping carriage return (CR) and line feed (LF) characters. This oversight allows an attacker to inject malicious content into the ICS file by crafting a URI that includes CRLF sequences. As a result, the attacker can terminate the original property and introduce new ICS properties or components, leading to the manipulation of calendar data such as added attendees or modified URLs.
How To Fix
Latest published version: 2.13.0 as of 22 Oct 2026
gem install icalendar -v 2.13.0
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.12.2
This is the first release that contains the fix.
gem install icalendar -v 2.12.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
As a temporary workaround, you can sanitize URI inputs by rejecting raw CR and LF characters before serialization. Here is an example of how to implement this in Ruby:
class SafeUri
def self.sanitize(uri)
uri.gsub(/\r|\n/, '')
end
end
v = Icalendar::Values::Uri.new(SafeUri.sanitize("https://a.example/ok\r\nATTENDEE:mailto:evil@example.com"))
puts v.to_ical(Icalendar::Values::Text)
Conclusion
The iCalendar package has a vulnerability (CVE-2026-33635) that allows ICS injection through unsanitized URI property values. It is crucial to update to version 2.12.2 or later to mitigate this risk. Additionally, implementing input sanitization can serve as a temporary workaround. Monitoring tools like Vulert can help keep your applications secure by alerting you to open-source vulnerabilities.
See every vulnerability recorded for icalendar →
FAQ
CVE-2026-33635 is a vulnerability in the iCalendar package that allows for ICS injection through unsanitized URI property values.
If your application generates .ics files from untrusted metadata, it may be susceptible to ICS injection, allowing attackers to manipulate calendar data.
The vulnerability affects iCalendar versions prior to 2.12.2. It is recommended to update to this version or later.
You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.
The CVSS score for this vulnerability is 4.3, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for icalendar.