View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
19253 | Bug reports | Security | public | 2023-11-20 12:15 | 2024-02-05 11:32 |
Reporter | DenisChenu | Assigned To | tibor.pacalat | ||
Priority | none | Severity | minor | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.3.x | ||||
Summary | 19253: CSV injection in export quota | ||||
Description | When using a spreadsheet program like Microsoft Excel or LibreOffice Calc to open a CSV file, the software interprets any cell that begins with "=" as a formula. CSV injection, also known as formula injection, occurs when websites incorporate user-supplied data into CSV files without proper validation. | ||||
Steps To Reproduce | Steps to reproduce(Replace this text with detailed step-by-step instructions on how to reproduce the issue) Expected result(Write here what you expected to happen) Actual result(Write here what happened instead) | ||||
Tags | No tags attached. | ||||
Bug heat | 260 | ||||
Complete LimeSurvey version number (& build) | 6.3.1+231023 | ||||
I will donate to the project if issue is resolved | No | ||||
Browser | not relevant | ||||
Database type & version | not relevant | ||||
Server OS (if known) | not relevant | ||||
Webserver software & version (if known) | not relevant | ||||
PHP Version | not relevant | ||||
https://bugs.limesurvey.org/view.php?id=19252 ======== It has been detected the possibility of injecting CSV formulas into the titles of survey quotas, which can subsequently be exported to CSV. To mitigate this vulnerability, it is recommended to validate the input entered by a user to ensure that no cell begins with any of the following characters: Equal to ("=") On its own, this functionality would not have a high impact, as the CSV quotas can only be exported by the same user. However, considering the vulnerability which allows the editing of quotas belonging to others, an attacker could add malicious formulas to another user, which would be executed when that user exports their quotas. |
|
@DenisChenu Shall I take this? |
|
You can. |
|
You mean the details of the ticket? |
|
Master PR: https://github.com/LimeSurvey/LimeSurvey/pull/3677 Implemented the filter over the input as suggested on the ticket. My call would be to create some kind of lib that escapes cell contents when exported.
|
|
Yes , see https://bugs.limesurvey.org/view.php?id=19252#c78528 Comment on a different issue. My opinion : we must allow it in DB, no reason to disallow it. But we must encode when export Strangely : we don't encode = on CsvExprt ? https://github.com/LimeSurvey/LimeSurvey/blob/8c332cc638306875f965ccd347ef5e5573f27ed0/application/helpers/admin/export/CsvWriter.php#L102 We have to add a
Maybe most simple here. |
|
You say
But you said this before
I believe it is no harm to apply in input (optionally) and mandatory on export. |
|
No : i copy/paste https://bugs.limesurvey.org/view.php?id=19252#c78528
If it's in model : it's not optionnal. |
|
@tibor.pacalat: I think we should create a new story for reviewing all csv exports, right? |
|
Yes : i think we have same issue on Export Response |
|
I'll create a story in our JIRA regarding | @tibor.pacalat: I think we should create a new story for reviewing all csv exports, right? This particular issue has been resolved. |
|
… arg , still not reported on my part … |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=36021 |
|
Fix committed to master branch: http://bugs.limesurvey.org/plugin.php?page=Source/view&id=36022 |
|
Fixed in Release 6.4.5+240205 |
|
LimeSurvey: master 41993c4a 2024-01-31 16:19 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 19253: CSV injection in export quota (03677) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 19253 |
|
mod - application/controllers/QuotasController.php | Diff File | ||
add - application/core/LSYii_NonFormulaValidator.php | Diff File | ||
mod - application/helpers/common_helper.php | Diff File | ||
mod - application/models/Quota.php | Diff File | ||
LimeSurvey: master 41993c4a 2024-01-31 16:19 Gabriel Jenik Committer: GitHub Details Diff |
Fixed issue 19253: CSV injection in export quota (03677) Co-authored-by: lapiudevgit <devgit@lapiu.biz> |
Affected Issues 19253 |
|
mod - application/controllers/QuotasController.php | Diff File | ||
add - application/core/LSYii_NonFormulaValidator.php | Diff File | ||
mod - application/helpers/common_helper.php | Diff File | ||
mod - application/models/Quota.php | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2023-11-20 12:15 | DenisChenu | New Issue | |
2023-11-20 12:15 | DenisChenu | Note Added: 78530 | |
2023-11-20 12:15 | DenisChenu | File Added: 5.png | |
2023-11-20 12:15 | DenisChenu | File Added: 6.png | |
2023-11-20 12:15 | DenisChenu | Bug heat | 250 => 252 |
2023-12-15 15:34 | gabrieljenik | Note Added: 79014 | |
2023-12-15 15:34 | gabrieljenik | Bug heat | 252 => 254 |
2023-12-15 15:53 | DenisChenu | Note Added: 79015 | |
2023-12-15 16:15 | gabrieljenik | Note Added: 79017 | |
2023-12-15 16:15 | gabrieljenik | Assigned To | => gabrieljenik |
2023-12-15 16:15 | gabrieljenik | Status | new => assigned |
2023-12-23 14:54 | gabrieljenik | Note Added: 79066 | |
2023-12-23 18:50 | DenisChenu | Note Added: 79067 | |
2023-12-26 18:16 | gabrieljenik | Note Added: 79069 | |
2023-12-27 14:16 | DenisChenu | Note Added: 79071 | |
2023-12-29 20:40 | gabrieljenik | Assigned To | gabrieljenik => DenisChenu |
2023-12-29 20:40 | gabrieljenik | Status | assigned => ready for code review |
2023-12-29 20:41 | gabrieljenik | Note Added: 79075 | |
2024-01-08 11:00 | DenisChenu | Note Added: 79098 | |
2024-01-08 11:02 | DenisChenu | Assigned To | DenisChenu => gabrieljenik |
2024-01-08 11:02 | DenisChenu | Status | ready for code review => ready for testing |
2024-01-08 14:14 | gabrieljenik | Assigned To | gabrieljenik => tibor.pacalat |
2024-01-31 15:21 | tibor.pacalat | Note Added: 79369 | |
2024-01-31 15:21 | tibor.pacalat | Bug heat | 254 => 256 |
2024-01-31 15:24 | tibor.pacalat | Status | ready for testing => resolved |
2024-01-31 15:24 | tibor.pacalat | Resolution | open => fixed |
2024-01-31 15:28 | DenisChenu | Note Added: 79371 | |
2024-01-31 15:29 | Changeset attached | => LimeSurvey master 41993c4a | |
2024-01-31 15:29 | Changeset attached | => LimeSurvey master 41993c4a | |
2024-01-31 15:29 | guest | Note Added: 79372 | |
2024-01-31 15:29 | guest | Note Added: 79373 | |
2024-01-31 15:29 | guest | Bug heat | 256 => 258 |
2024-01-31 15:29 | guest | Bug heat | 256 => 258 |
2024-02-05 11:32 | LimeBot | Note Added: 79413 | |
2024-02-05 11:32 | LimeBot | Status | resolved => closed |
2024-02-05 11:32 | LimeBot | Bug heat | 258 => 260 |