Vulnerabilities in pkg:gem/icalendar

PACKAGE
Advisory Identifier: GHSA-pv9c-9mfh-hvxq
Advisory Summary

CVE-2026-33635 is a MODERATE (CVSS 4.3) icalendar has ics injection vulnerability (CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')) affecting Icalendar libraries in the RubyGems ecosystem. The issue involves icalendar has ics injection via unsanitized uri property values. Remediation is available by upgrading affected packages to version 2.12.2.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:gem/icalendar

1 Known Advisory Record(s)

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

Advisory ID CVE / NVD Severity Summary
GHSA-pv9c-9mfh-hvxq CVE-2026-33635 MODERATE iCalendar has ICS injection via unsanitized URI property values

CVE-2026-33635 at a Glance

CVE Identifier CVE-2026-33635
GHSA Identifier GHSA-pv9c-9mfh-hvxq
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection')
Affected Product Icalendar
Package Ecosystem RubyGems
Published Date
Last Updated

Security Impact

CVSS: 4.3

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:R/S:U/C:N/I:L/A:N).

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

How to Fix CVE-2026-33635

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: 2.12.2
Upgrade icalendar to 2.12.2
Verify Direct and Transitive Dependencies

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

inspect dependencies for icalendar

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-33635, inspect your project dependencies for Icalendar:

inspect dependencies for 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 2.12.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection'), where the product uses crlf (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes crlf sequences from inputs. 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 .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: ```ruby 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: ```text ;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.

CVE-2026-33635 Affected Icalendar Versions

1 component(s)
Fixed Versions:
2.12.2
Product / Package Ecosystem Affected Versions Fixed Version
icalendar
RubyGems
≥ 2.0.0
< 2.12.2
2.12.2

References

Frequently Asked Questions

What is CVE-2026-33635?
CVE-2026-33635 is a security vulnerability in Icalendar involving iCalendar has ICS injection via unsanitized URI property values under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection').
Which Icalendar versions are affected?
Affected versions include releases prior to 2.12.2 across affected packages: icalendar.
What version fixes CVE-2026-33635?
Upgrading to 2.12.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is icalendar affected?
Yes, icalendar is affected in releases prior to 2.12.2. Upgrade your dependency to 2.12.2 or later.
What is the CVSS score of CVE-2026-33635?
CVE-2026-33635 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-33635?
CVE-2026-33635 is classified under CWE-93: Improper Neutralization of CRLF Sequences ('CRLF Injection') (The product uses CRLF (carriage return line feeds) as a special element, e.g. to separate lines or records, but it does not neutralize or incorrectly neutralizes CRLF sequences from inputs.).
How can I check RubyGems dependencies for CVE-2026-33635?
Run the dependency tree command: 'inspect dependencies for 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-pv9c-9mfh-hvxq",
  "modified" : "2026-03-27T22:00:24Z",
  "published" : "2026-03-24T19:13:41Z",
  "aliases" : [ "CVE-2026-33635" ],
  "summary" : "iCalendar has ICS injection via unsanitized URI property values",
  "details" : "### Summary\n.ics serialization does not properly sanitize URI property values, enabling ICS injection through attacker-controlled input, adding arbitrary calendar lines to the output.\n\n### Details\n`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)\n\nRelevant code:\n- `lib/icalendar/values/uri.rb:16`\n\n### PoC\nRun the following with the library loaded:\n\n```ruby\nrequire \"icalendar/value\"\nrequire \"icalendar/values/uri\"\n\nv = Icalendar::Values::Uri.new(\"https://a.example/ok\\r\\nATTENDEE:mailto:evil@example.com\")\nputs v.to_ical(Icalendar::Values::Text)\n```\n\noutput:\n\n```text\n;VALUE=URI:https://a.example/ok\nATTENDEE:mailto:evil@example.com\n```\n\n### Impact\nApplications 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.\n\n## Fix\nReject raw CR and LF characters in `URI`-typed values before serialization, or escape/encode them so they cannot terminate the current ICS content line.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "RubyGems",
      "name" : "icalendar"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.12.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/icalendar/icalendar/security/advisories/GHSA-pv9c-9mfh-hvxq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-33635"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/icalendar/icalendar/commit/b8d23b490363ee5fffaec1d269a8618a912ca265"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/icalendar/icalendar"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/icalendar/CVE-2026-33635.yml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-93" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-24T19:13:41Z",
    "nvd_published_at" : "2026-03-26T21:17:07Z"
  }
}