Drupal security updates, in plain English · Module

Calculation Fields

140 sites report using it · on drupal.org · 1 security update explained here

This module adds a feature to web forms that can calculate mathematical expressions.

Below is every security update for Calculation Fields that this site has covered, newest first. Each one says who could exploit it, whether it applies to your site, how urgent it is, and what to tell your developer. If your site uses this module and you are not sure which version, that is the first question to ask whoever looks after it.

Calculation Fields

Moderately critical · 140 sites report using it · SA-CONTRIB-2026-023 · on drupal.org · Week of 4 March 2026

The system does not properly check the information typed into the form. A person could enter malicious scripts to see private information or change data on the website.

  • Who could do thisAnyone visiting the site. No login needed.
  • Does it apply to youAny site using this module.
  • 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 Calculation Fields to 1.0.4.

For developers: what the fix changed

Adds HTML escaping to calculation results and enforces numeric validation on inputs in `js/calculation-fields.js` and `FormCalculationMarkupElement.php` to prevent XSS.

Also in this release Removed packaging metadata from info files, updated README documentation, and improved handling of zero values in expressions.

1.0.3 to 1.0.4 5 commits, 16 files including 1 test.

  • README.md +17 −2
  • calculation_fields.info.yml +0 −6
  • calculation_fields.module +1 −1
  • js/calculation-fields.js +69 −13 fix
  • modules/calculation_fields_example/calculation_fields_example.info.yml +0 −5
  • modules/calculation_fields_example/calculation_fields_example.module +1 −1
  • modules/webform_calculation_fields/README.md +8 −3
  • modules/webform_calculation_fields/modules/webform_calculation_fields_examples/webform_calculation_fields_examples.info.yml +0 −5
  • modules/webform_calculation_fields/src/Plugin/WebformElement/WebformCalculationNumber.php +0 −1
  • modules/webform_calculation_fields/webform_calculation_fields.info.yml +0 −5
  • src/CalculationFieldsTrait.php +1 −2
  • src/Element/FormCalculationElement.php +3 −5

Full diff, 1.0.3 to 1.0.4

The comparison is against the release immediately before the fix. If your site is on an older release, more will have changed.

Not sure what your site is running?

Send me your Drupal site's address.

I'll tell you what I can see from outside, what the Drupal 10 end of life on 9 December means for it, and what it would cost to have me keep it patched. There's no charge for that and no obligation. peter@peterbrady.co.uk


Get in touch

Tell me who you are, what your organisation does, and what you need. That might be a Drupal site that needs looking after, an upgrade to get done before December, or an agency that needs Drupal cover.

If I can help, I'll say so and suggest a call. If I can't, I'll tell you straight away rather than waste your time.

peter@peterbrady.co.uk

For context: I work mainly with UK charities, membership bodies and research organisations, and with the agencies that look after their websites. Not recruiters.

Or start smaller and connect with me on LinkedIn. That's where I post what I find digging around in charity and grants data, and where the free tools turn up first.