The vulnerability lies in the improper construction of iCalendar files within the CalDAV feature of Vikunja. The root cause is the lack of output escaping for user-controlled data when generating the iCalendar .ics file. The primary function responsible is caldav.ParseTodos in pkg/caldav/caldav.go, which takes task data and builds the iCalendar string through raw concatenation. The vulnerability description explicitly points to this function. The provided patch confirms this by introducing a new escaping function, escapeICalText, and applying it to various fields within ParseTodos and its helper functions ParseAlarms and ParseRelations. Specifically, fields like task summary, description, UID, and categories were not escaped, allowing an authenticated user to inject CRLF characters and thus new iCalendar properties (e.g., ATTACH, VALARM). This could lead to phishing attacks, auto-download of malicious files, or social engineering. The analysis of the patch 7b29b1b6a5917906c5239008fb3f8e3bf49a9f9b clearly shows the vulnerable code being replaced with properly escaped versions, confirming the identified functions as the source of the vulnerability.