CSV Field
The module does not sufficiently escape CSV cell and header values before passing them to the library. An ordinary account on the site could view restricted information and alter or add new data by injecting malicious scripts.
- Who could do thisOnly someone with a login on your site.
- Does it apply to youAn attacker must have a role with the access right to create or edit content that contains a CSV field.
- Has it been used in attacksNo sign of it.
- How urgentDrupal rates this moderately critical. Include it in your next routine update, within the month.
Tell your developerUpdate CSV Field to 3.0.7 or 2.0.10, whichever branch you are on.
For developers: what the fix changed
The fix introduces an `escapeCsvValue` function in `js/csv-field.js` that uses `Drupal.checkPlain()` to sanitise CSV cell and header values before they are passed to the DataTables library.
Also in this release The release also updates `fgetcsv` calls for PHP 8.4 compatibility, adds GitLab CI configuration, and updates tests.
.cspell-project-words.txt+16 −0.gitlab-ci.yml+53 −0csv_field.libraries.yml+2 −0js/csv-field.js+57 −21 fixsrc/Plugin/Field/FieldFormatter/CsvFileTableFormatter.php+1 −1src/Plugin/Field/FieldWidget/CsvFileWidget.php+18 −16