Needs review
Project:
Webform
Version:
6.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
12 Nov 2026 at 16:40 UTC
Updated:
13 Nov 2026 at 11:05 UTC
Jump to comment: Most recent
This was previously reported to the Drupal Security Team, who cleared it to be a public issue.
#3440366: Modify formula injection warning when drupal/webform_xlsx_export is installed warned that the CSV exporter doesn't escape. But this should be possible.
Add an off-by-default escaping following the same technique used in the Symfony CSV serializer, which is to add a single quotation mark before likely formulas.
This updates the injection warning and adds the option.
None.
This adds one item to the settings schema.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
cilefen commentedComment #4
cilefen commentedComment #5
cilefen commentedComment #6
liam morlandI just had a quick look. Was it intentional to set
escape_formulasto true inconfig/install/webform.settings.yml?Comment #7
cilefen commentedYes. My position is that new installs should get the protection but we don’t opt in existing sites.
Its notable that this MR changes the escape parameter to function fputcsv from
\\to an empty string when there may be a formula, so it’s more effective. From the fputcsv’s docs:So in its current form, this MR is backwards compatible with the legacy setting when there isn’t a formula. We can discuss updating the legacy setting in all cases.