Security for a Rails shop: updates, dependencies and the attacks that actually happen

TL;DR

Difficulty: Advanced

A Rails shop stays secure through a routine, not a one off project.

  • Check every month that Ruby, Rails and Solidus are still supported. Rails gives each series two years of security fixes, Solidus 18 months.
  • Patch critical and high fixes within 14 days, the rest monthly, and measure your mean time to patch.
  • Run bundler audit, a JavaScript audit and Brakeman on every build and weekly on a schedule, and still read the advisories: copied storefront code and operating system packages slip past every scanner.
  • Keep the Rails defaults against CSRF, XSS, SQL injection and mass assignment on, and test your authorisation rules.
  • Rate limit login, password reset and payment, check that the IP address you limit by is real, add a content security policy, lock the admin down and practise rotating secrets.
  • When card testers abuse the checkout, refund fast, alert on decline spikes and write the incident down.

Nothing in a shop's own code has to change for it to become vulnerable. Frameworks publish new flaws, versions fall out of support, and scripts abuse features that work exactly as built. This chapter sets out the monthly routine that keeps a Rails and Solidus shop secure, with the real advisories of 2026, the code, and one invented card testing night worked through to the pound.

Security is a routine, not a project

A shop that went live safely in 2024 is not safe in 2027 by default. Nothing in its own code has to change for it to become vulnerable. The frameworks it runs on publish new flaws, the versions it runs fall out of support, and attackers find new ways to abuse features that work exactly as designed. Security for a Rails shop is therefore not a project you finish. It is a routine you run, every month, for as long as the shop exists.

This chapter is about that routine. It covers the three ways a small shop actually gets hurt: a known flaw in a dependency, a flaw in the shop's own code, and the abuse of a working feature such as the payment step. For each I show what to run, what to read and what to change, with the code. The example is the invented shop of this series, Wrenfield Home in Leeds: about 1,400 products, 110,000 sessions and 1,980 orders a month, running Ruby on Rails and Solidus on two application servers and one managed PostgreSQL database, deployed with Kamal. Priya owns it. Callum, the developer, looks after operations part time.

Where this chapter touches the law (data protection and the EU Cyber Resilience Act), it is general information, not legal advice. Every date and version below was read from its official source on 23 November 2026, and I give the source each time, because these dates move.

This chapter assumes you have read how to know your shop is broken before your customers tell you, because several defences here end in an alert. A later chapter in this series covers upgrading Rails and Solidus without fear. Here the focus is staying patched inside the versions you have, and knowing when that stops being possible.

Example: three ways Wrenfield can get hurt

Take three events, all invented for this series, and all of a kind that happens to real shops.

  1. A flaw in a dependency. The Rails team publishes a security release. Until Callum deploys it, anyone who reads the advisory knows how to attack every Rails shop that has not updated. Wrenfield did nothing wrong, it just has not updated yet.
  2. A flaw in Wrenfield's own code. Two years ago Callum wrote a small search filter that builds an SQL string from what the customer typed. It works. It is also an open door, because a crafted search term can read other tables.
  3. The abuse of a working feature. On a Saturday night a script sends 2,460 payment attempts through the checkout in two and a half hours to find out which stolen card numbers still work. Every part of the checkout behaves exactly as built.

The first is solved by patching, the second by reading your own code with tools and reviews, the third by limits and monitoring. The rest of this chapter takes them in that order, because that is the order in which they are least expensive to prevent.

Most attacks on a small shop are automated, and size does not protect you

The first objection I hear is "who would attack a homeware shop in Leeds?" Nobody, in person. The attacks that reach small shops are run by scripts that try every shop they can find. They do not choose a target, they find one that has not patched or not limited.

The UK government's Cyber security breaches survey 2025/2026, published on 30 April 2026, found that 43% of businesses identified a breach or attack in the previous 12 months, 42% of micro and 46% of small businesses among them1. The same survey found that only 34% of businesses had a policy to apply software security updates within 14 days1. That second number is the one that matters for this chapter, because 14 days is exactly the deadline the UK's Cyber Essentials scheme sets. Its requirements, version 3.3 of April 2026, say that software must be "licensed and supported", removed when it becomes unsupported, and updated within 14 days of release when the update fixes a vulnerability the vendor rates critical or high risk, or one with a CVSS v3 base score of 7 or above2. The Common Vulnerability Scoring System (CVSS) is the standard 0 to 10 severity score that most advisories carry.

So the bar is not secret and not high: run supported versions, and install the serious fixes within two weeks. Two thirds of businesses do not have even that as a rule.

Example: what "14 days" means for Wrenfield

Say a high severity Rails fix is published on a Wednesday. Fourteen days later is the Wednesday two weeks on. If Callum's routine runs only on the first Tuesday of every month, and the fix appears the day after that Tuesday, it waits 27 days for the next run. That is almost twice the Cyber Essentials limit. A monthly routine alone is therefore not enough. It needs a second, faster lane for critical and high fixes, which is exactly what the routine below has.

What "supported" means for Ruby, Rails and Solidus

Every piece of software in a Rails shop has a support window. Inside it, the maintainers publish fixes. Outside it, a new flaw stays open in your version for good, and the only fix is an upgrade. So the first security question is not "are we patched?" but "are we on versions that still get patches?"

Rails publishes its maintenance policy. Each minor release series (8.0, 8.1 and so on) gets bug fixes for one year and security fixes for two years after its first release3. On the Rails maintenance page, read on 23 November 2026, the supported series for security fixes were 8.1, until 10 October 2027, and 8.0, until 7 November 20264. Everything older is out. The page is blunt about what that means: when a series is no longer supported, "it's your own responsibility to deal with bugs and security issues"4.

Ruby publishes its branches page. On the same day it listed Ruby 4.0 and 3.4 in normal maintenance, Ruby 3.3 in what it calls legacy maintenance, with an expected end of life on 31 March 2027, and Ruby 3.2 as end of life since 1 April 20265.

Solidus has its own security policy: each version gets security patches for 18 months (540 days) after its first release. The table on the Solidus security page listed v4.8 (supported until 1 April 2028), v4.7 (until 8 October 2027) and v4.6 (until 3 March 2027) as supported, and v4.5 as end of life since 14 August 20266.

ComponentSupported series on 23 November 2026End of security supportSource
Rails8.110 October 2027Rails maintenance page
Rails8.07 November 2026Rails maintenance page
Ruby4.0, 3.4not yet announcedRuby branches page
Ruby3.331 March 2027 (expected)Ruby branches page
Solidus4.81 April 2028Solidus security policy
Solidus4.78 October 2027Solidus security policy
Solidus4.63 March 2027Solidus security policy

Notice how close some of these dates sit to this chapter's publication on 16 March 2027. A shop that was fully supported at Christmas can be out of support on two fronts by Easter without anyone touching it.

Example: Wrenfield's applications on 16 March 2027

Callum adds an end of life check to the routine and runs it for the first time, not only for the shop but for everything Wrenfield runs. The main shop is current, on Rails 8.1 and Solidus 4.8.1, as in the earlier chapters of this series. The check also finds a second application nobody had thought about for years: an old wholesale ordering app for trade customers, still running, and sharing the credentials of the customer database. The wholesale app and its versions are invented for this example. The dates are the official ones above.

ApplicationComponentRunsSecurity supportStatus on 16 March 2027
Main shopRails8.1until 10 October 2027supported
Main shopSolidus4.8until 1 April 2028supported
Wholesale appRuby3.3until 31 March 2027 (expected)15 days left
Wholesale appRails7.1ended: the 7.1 series started on 5 October 2023, so the two year rule ended it in October 2025out of support
Wholesale appSolidus4.5ended 14 August 2026out of support

The first release of Rails 7.1 was 7.1.0 on 5 October 2023, and its last release was 7.1.6 on 28 October 2025, according to RubyGems7. Two years after the first release is October 2025, which matches. So the wholesale app has been running an unsupported Rails for about five months and an unsupported Solidus for seven. Nothing broke, which is exactly why nobody noticed. And because it shares the customer database credentials, a flaw in the forgotten app is a flaw in the shop's data.

What did the wholesale app miss? The next section answers that with real advisories. The fix, upgrading one step at a time, is the subject of a later chapter in this series. The point here is that the end of life check belongs in the monthly routine, not in someone's memory.

Security releases arrive in batches, so plan for them

A security release is a new version that contains only security fixes. Rails marks them with a fourth version digit: 8.1.4.1 is the security release on top of 8.1.4. According to the Rails security policy, fixes are prepared for all supported releases, held back until an agreed date, and then published together with an announcement8. Solidus works the same way: fixes are prepared for every supported version and published on the same day as the advisory, the mailing list post and the new gems6.

The real pattern in 2026 shows why a routine needs slack. I counted the advisories each project published on GitHub in 2026, up to 23 November910.

Stacked bar chart of real advisories counted from the GitHub security advisory pages of Rails and Solidus up to 23 November 2026. Rails on 23 March: 10 low. Rails on 29 July: 1 critical. Solidus on 9 September: 1 high and 2 medium. Solidus on 7 October: 3 high, 3 medium and 2 low. Rails on 4 November: 1 critical, 4 high, 13 medium and 3 low, 21 in total. Solidus on 5 November: 1 high, 5 medium and 4 low, 10 in total. In all, 32 Rails and 21 Solidus advisories, most of them in the autumn. Tap or click to open full screen and move around

Three things stand out. First, the batches are uneven: ten low severity fixes in March, then a single critical one in July, then 21 at once in November. Second, Solidus published 21 advisories in nine weeks between September and November, after none since 2022. Third, the two projects published within a day of each other in November, so a shop running both had 31 advisories to read in one week.

Example: what Wrenfield's wholesale app missed in 2026

For the main shop on Rails 8.1 and Solidus 4.8, the 2026 advisories meant patch releases and nothing more: the November Rails security release and Solidus 4.8.1, each a small update through the routine below. The wholesale app runs Rails 7.1 and Solidus 4.5, both out of support. Here is what that meant for three of the 2026 advisories, taken straight from the advisory texts.

The critical Rails advisory of 29 July 2026 (CVE-2026-66066) describes a flaw in Active Storage image variants: an attacker who can upload a crafted image may read arbitrary files from the server, including the process environment with secret_key_base and other credentials11. Fixed versions were published for 7.2, 8.0 and 8.1. The affected range starts below 7.2, so Rails 7.1 is affected and has no fixed version at all. The advisory also notes that the libvips library on the server must be at least version 8.13, which no gem update can deliver.

The Solidus advisory about arbitrary payment amounts (GHSA-c2fq-w6qj-3hj4) says two API endpoints let a caller set a payment to any amount, which could let a shop ship orders it was never fully paid for12. It was fixed in 4.6.3 and 4.7.1. For versions below 4.6, the patched version field is empty: the only help is the workaround the advisory describes, which includes making sure Spree::Config[:require_payment_to_ship] is true.

The Solidus advisory about account enumeration on the password reset page (GHSA-mhwq-2v9w-r659) says in bold that "Upgrading the Solidus gem does not fix existing stores", because the storefront code was copied into each application when it was generated13. Every shop has to patch its own UserPasswordsController, whatever version it runs, the main shop included.

So for the wholesale app, Callum works through three different kinds of fix: one that needs an upgrade (Rails 7.1 has no patch), one that needs a configuration workaround until the upgrade, and one that needs a code change in Wrenfield's own repository, which no version bump would ever have delivered.

Callum also triages reachability. Trade customers cannot upload images in the wholesale app, only staff can, so the Active Storage flaw needs a staff account to exploit. That lowers the urgency from "tonight" to "this week". It does not remove the need to fix it: staff accounts get phished too, and the file read would expose the customer database credentials the app shares with the shop. Until the upgrade, Callum gives the wholesale app its own database user with access only to the tables it needs, and puts it behind the same network restriction as the admin.

The monthly routine, and the fast lane next to it

Here is the routine I recommend for a shop of Wrenfield's size. It has a fixed monthly run and a fast lane for anything critical or high that is reachable in the shop. Everything goes through the same test gate and the same deploy, because a security fix that breaks the checkout is its own incident.

Tap or click to open full screen and move around

Where do the announcements come from? Rails asks everyone to subscribe to the Rails Security Announcements section of its forum, which it describes as "very low traffic"8. Solidus recommends GitHub's alerts for vulnerable dependencies or its security mailing list6. Ruby publishes its security news on the Ruby website. Subscribing takes ten minutes and is the single most useful thing on this page.

The rebuild step matters more than it looks. A Kamal deploy ships a Docker image, and that image contains operating system packages such as libvips, OpenSSL and the PostgreSQL client. The July Rails advisory needed a newer libvips, and no Ruby tool would have told Callum. Rebuilding the image from an updated base image every month, not only when the Gemfile changes, keeps those packages current. The deploy itself is covered in the Kamal chapter of this series.

For the Ruby side, the Rails security guide gives one precise instruction: update a vulnerable gem with bundle update --conservative gem_name, which updates that gem without pulling every other gem forward14. That keeps a security fix small enough to review.

I put every release, a security fix included, through a test gate and a release register. The test gate means nothing deploys unless the full suite passes. The register records what changed, why and when, which is also the evidence you need later, as the article on release registers and security testing per release explains.

Example: Callum's time budget for the routine

All figures are invented for Wrenfield. A normal monthly run looks like this.

StepMinutes
Read announcements and Dependabot alerts, triage30
Update branch: bundle update --conservative, JavaScript updates, image rebuild40
Audits and Brakeman in continuous integration, read the results15
Full test suite, review failures35
Deploy, smoke test, release register entry20
End of life check10
Total150

Two and a half hours a month, or 30 hours a year. At an internal cost of £45 an hour for Callum's time, that is £1,350 a year. Fast lane runs come on top. In 2026 there would have been four of them (the July critical, the high ones in October and twice in November), at about two hours each, so another £360. About £1,710 a year in total, before any upgrade project.

Measure how long you stay exposed

You cannot manage what you never measure. The one number I would track for patching is the mean time to patch: on average, how many days pass between an advisory being published and the fix running in production.

tˉ=1n∑i=1n(dideployed−dipublished)\bar{t} = \frac{1}{n}\sum_{i=1}^{n}\left(d_i^{\text{deployed}} - d_i^{\text{published}}\right)

Here tˉ\bar{t} is the mean time to patch in days, nn is the number of advisories that applied to the shop in the period, dideployedd_i^{\text{deployed}} is the date the fix for advisory ii went live, and dipublishedd_i^{\text{published}} is the date advisory ii was published. The idea of a mean is explained in Foundations: mean. Track the worst single case as well, because one advisory left open for three months matters more than a good average.

Example: Wrenfield's mean time to patch after the routine starts

Callum records six advisories that applied to Wrenfield in the first quarter of the new routine. They are invented, labelled A to F, with the days between publication and deployment.

AdvisorySeverityLaneDays to deploy
Ahighfast2
Bmediummonthly13
Clowmonthly13
Dcriticalfast1
Emediummonthly22
Flowmonthly22

tˉ=2+13+13+1+22+226=736=12.2\bar{t} = \frac{2 + 13 + 13 + 1 + 22 + 22}{6} = \frac{73}{6} = 12.2

So tˉ=12.2\bar{t} = 12.2 days. More useful is the split by lane: the two serious ones took 1 and 2 days, well inside the 14 day bar, while medium and low ones waited up to 22 days for the monthly run. That is an informed choice, and it is written down, which is what an insurer or a payment provider will ask about.

Dependency auditing: bundler audit, Dependabot and the JavaScript side

A Rails shop does not only run Rails. Wrenfield's Gemfile.lock lists well over a hundred gems, most of them pulled in by other gems. Any of them can carry a flaw. Reading every advisory by hand does not scale, so tools compare your locked versions against databases of known flaws.

The bundler-audit gem checks Gemfile.lock for gem versions with known vulnerabilities and for insecure gem sources (http:// and git://), using the community ruby advisory database. Its README notes that the check itself "does not require a network connection", and that bundle-audit check --update refreshes the database first, which is what you want in continuous integration15. Rails 8.1 ships it in new applications: a bin/bundler-audit script, a config/bundler-audit.yml file with an ignore list for advisories that do not apply, and a step in the generated continuous integration workflow16. For an older application, add the gem and copy the same two files.

The JavaScript side needs its own audit. With importmap, Rails generates a bin/importmap audit step16. With npm, npm audit sends a description of your dependencies to the registry and reports known vulnerabilities, and --audit-level sets the lowest severity that fails the run17. The npm documentation adds a warning worth repeating about npm audit fix --force: it may install major versions outside your stated ranges, and "If you don't have a clear idea of what you want to do, it is strongly recommended that you do not use this option!"17

GitHub's Dependabot opens pull requests for outdated or vulnerable dependencies. It is configured in .github/dependabot.yml. Two options keep it useful for a shop: groups, which bundle related updates into one pull request, and a cooldown, which waits a few days before proposing a brand new version. The documentation says the default cooldown is three days and that it does not apply to security updates18, which is the right way round: a new version waits, a security fix does not.

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "bundler"
    directory: "/"
    schedule:
      interval: "weekly"
    cooldown:
      default-days: 7          # new versions wait a week, security fixes do not
    groups:
      rails:
        patterns: ["rails", "action*", "active*", "railties"]
      solidus:
        patterns: ["solidus*"]
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "monthly"

The rails group keeps all the Rails component gems (actionpack, activerecord and so on) in one pull request, because they are released together and must move together.

Example: the three blind spots of every scanner

In its first year of auditing, Callum finds that the scanners catch most problems but miss three kinds, all real and all described above.

  1. Copied code. The Solidus storefront is generated into the application, so its controllers are Wrenfield's code, not a gem. The password reset and guest token advisories of autumn 2026 did not appear in any gem audit, because no gem version was wrong1319. Only reading the advisory found them.
  2. Operating system packages. libvips, OpenSSL and the database client live in the Docker image, not in Gemfile.lock. Only the monthly image rebuild, and reading the advisory, covers them.
  3. Unsupported versions. A scanner says "update to 7.2.3.2 or later". It does not say that this is a minor version jump with its own upgrade work. Only the end of life check turns that into a plan.

That is why the routine starts with reading, not with running a tool.

Brakeman reads your own code

Dependency audits only look at other people's code. Brakeman looks at yours. Its README describes it as "a static analysis tool which checks Ruby on Rails applications for security vulnerabilities"20. Static analysis means it reads the source without running it, so it can warn about an SQL string built from request parameters long before anyone sends a malicious one. Rails 8.1 generates a bin/brakeman script in new applications and puts it into the continuous integration workflow by default16.

Every warning carries a confidence level, high, medium or weak, which Brakeman describes as "a rough estimate of how certain the tool is that a given warning is actually a problem"20. False positives happen. Brakeman's way to handle them is an ignore file at config/brakeman.ignore, created interactively with brakeman -I, with a note for each entry20. The note matters: an ignore without a reason is a vulnerability you have decided to forget.

Example: the search filter Brakeman flags

Here is the invented filter from the start of this chapter, in Wrenfield's own code.

# app/models/spree/product_decorator.rb (before)
def self.name_contains(term)
  where("spree_products.name ILIKE '%#{term}%'")   # term comes from params[:q]
end

Brakeman reports an SQL injection warning with high confidence on this line, because a request parameter is interpolated into an SQL fragment. A search for x%' OR 1=1 -- would change the query's meaning. The fix uses a placeholder, so the database treats the term as data, and sanitize_sql_like, which escapes the % and _ characters that have a special meaning inside LIKE patterns21. The fixed method:

# app/models/spree/product_decorator.rb (after)
def self.name_contains(term)
  pattern = "%#{sanitize_sql_like(term.to_s)}%"
  where("spree_products.name ILIKE ?", pattern)
end

The rewritten line has no interpolation into SQL, Brakeman's warning disappears, and a test proves that a search for 100% finds products named "100% linen" and nothing else.

One continuous integration step for all of it

The audits are only worth something if they run without anyone remembering to. This GitHub Actions workflow runs them on every pull request, on every push to the main branch, and once a week on a schedule. The schedule is the important part: a new advisory can turn yesterday's green build red without a single commit.

# .github/workflows/security.yml
name: Security
on:
  pull_request:
  push:
    branches: [ main ]
  schedule:
    - cron: "0 6 * * 1"   # every Monday at 6am UTC, catches new advisories

jobs:
  scan_ruby:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
      - name: Known vulnerabilities in gems
        run: bin/bundler-audit check --update
      - name: Static analysis of the shop's own code
        run: bin/brakeman --no-pager --exit-on-warn

  scan_js:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: ruby/setup-ruby@v1
        with:
          bundler-cache: true
      - name: Known vulnerabilities in JavaScript packages
        run: bin/importmap audit   # with npm instead: npm audit --audit-level=high

The job layout follows the workflow that Rails 8.1 generates for new applications, which runs bin/brakeman --no-pager, bin/bundler-audit and bin/importmap audit in the same way16. If your shop uses Kamal's pre build hook as its test gate, as the Kamal chapter describes, run the same three commands there too, so a laptop deploy cannot skip them.

Example: what the tools found in Wrenfield's first year

The numbers are invented. Callum logs every finding for a year and marks whether it was a real issue for Wrenfield or not applicable (a false positive, or a flaw in code the shop never reaches).

Grouped bar chart with invented example figures. The gem audit found 14 issues, 11 real and 3 not applicable. The JavaScript audit found 5, 3 real and 2 not applicable. Brakeman found 6, 2 real and 4 false positives. Reading advisories by hand found 4 real issues that no tool reported, in copied storefront code and operating system packages. Content security policy reports led to 3 real fixes. In total 23 real issues, 4 of which only a person reading advisories found. Tap or click to open full screen and move around

Of 32 findings, 23 were real. The gem audit found the most, which is why it runs on every build. But 4 of the 23 real issues came from reading advisories, and no tool would ever have reported them. Brakeman found fewer real issues than false positives, which is normal for a mature codebase, and its two real ones (the search filter above and an unescaped admin note) were both in code Callum wrote himself.

The classics from the Rails security guide still matter

The Rails security guide is long and worth reading once in full14. Rails protects you by default against most of the classic attacks, as long as you do not switch the protection off. Here are the five that matter most in a shop, each with the way it fails in practice. The Solidus advisories of 2026 are useful here, because they show the same mistakes in a mature, reviewed codebase.

Cross site request forgery

Cross site request forgery (CSRF) tricks a logged in user's browser into sending a request to your shop from another site. Rails defends with a token in every form, and the guide confirms forgery protection is on by default in new applications14. It fails when someone adds skip_forgery_protection to a controller to make a form or webhook work and forgets to scope it. In a shop, payment provider webhooks legitimately skip the token, so they must verify the provider's signature instead. Stripe calls this out explicitly: verify webhook signatures22.

Cross site scripting

Cross site scripting (XSS) gets an attacker's script to run in someone else's browser on your domain. Rails escapes everything a view prints by default. It fails at raw, html_safe and any helper that returns unescaped HTML. The Solidus advisory GHSA-x943-j5hw-mr2w of October 2026 is a textbook case: the product description helper rendered the description as raw HTML, so a script stored in a description ran for every visitor, and the advisory describes a demonstrated account takeover through it23. Planting it needed a back office account. That is still a real risk, because a phished staff password is a common way in.

SQL injection

SQL injection was the example above. Active Record protects every query built with hashes and placeholders. It fails wherever a string is interpolated into SQL, in where, order, pluck or find_by_sql. Brakeman finds most of these.

Mass assignment

Mass assignment means accepting a whole hash of attributes from a request and writing it to a model. Rails' strong parameters require you to list the permitted attributes. It fails at permit!, which allows everything. The Solidus advisory GHSA-q5w8-wf94-jc29 of November 2026 describes exactly this: the admin base controller used permit! as a fallback, so an admin could set attributes the forms never showed, such as deleted_at or foreign keys24. The payment amount advisory above was also a permitted attributes problem12.

Secrets in the repository

Rails keeps secrets in config/credentials.yml.enc, encrypted with config/master.key or the RAILS_MASTER_KEY environment variable. The encrypted file can live in version control "as long as the master key is kept safe"14. It fails when the master key, or a raw API key, lands in a commit, a log or a chat message. The filter_parameters list that Rails generates (password, email, token, secret, cvv and others) keeps such values out of the logs16; extend it rather than shorten it.

Authorisation, the one the framework cannot do for you

The OWASP Top 10, the Open Worldwide Application Security Project's list of the most critical web application risks, puts broken access control first in its 2025 edition25. It is also the largest group among the Solidus advisories of 2026: a back office user able to make themselves an administrator (GHSA-rw5f-4cm4-pc4m), a customer able to cancel another customer's returns, a shipment transfer without an authorisation check1026. No framework default helps here, because only you know who may do what. The defence is a test for every rule: "a customer cannot see another customer's order", "a user manager cannot assign the admin role". I write those tests first, which is the whole idea of test driven development in Rails.

Example: Wrenfield's checklist against the classics

Callum turns the five classics plus authorisation into checks that run on every build or every month.

RiskCheckHow often
CSRFgrep for skip_forgery_protection, each hit verifies a signatureevery build
XSSBrakeman, plus grep for raw and html_safe in viewsevery build
SQL injectionBrakemanevery build
Mass assignmentgrep for permit!, plus Brakemanevery build
Secretssecret scanning on the repository, filter_parameters reviewedmonthly
Authorisationone request spec per rule, including the Solidus roles in useevery build

Hardening the logins

Two kinds of login matter in a shop: customers and staff. Customers need sensible rules that do not cost conversions. Staff need much stricter ones, because a staff account can change prices, refund orders and export customer data.

Most Solidus shops authenticate with the solidus_auth_devise extension. Its Spree::User model enables the Devise modules for database authentication, registration, password recovery, remember me, tracking, validation and encryption, plus confirmation when configured. Lockable, the Devise module that locks an account after failed attempts, is not among them27. Without it, or a rate limit, nothing slows down a script guessing passwords.

For the password rules themselves, the clearest modern reference is NIST Special Publication 800 63B, revision 4, from the US National Institute of Standards and Technology. It was written for US government systems, but its password rules are widely used as good practice. It requires a minimum of 15 characters for passwords used on their own and at least eight when they are part of multi factor authentication, says systems "SHALL NOT impose other composition rules" such as mixing character types, and "SHALL NOT require subscribers to change passwords periodically"28. It requires checking new passwords against a blocklist of common and compromised values, and limiting failed attempts on an account28.

The Rails security guide adds a point that shops often miss: the forgotten password page must not reveal whether an email address has an account, because that lets an attacker build a list of customers to attack14. That is precisely what the Solidus advisory GHSA-mhwq-2v9w-r659 fixed in the storefront's password reset13.

Example: Wrenfield's login rules

Callum sets these rules. The numbers are his choices for this example.

  • Customers: at least 12 characters, checked against a list of breached passwords, no composition rules, no forced changes. The 12 is a compromise below NIST's 15 for a single factor, chosen so that checkout sign ups do not suffer, and written down as a decision.
  • Customers: 10 failed logins per email in 20 minutes, then a pause. The same generic message ("email or password not correct") whether the account exists or not.
  • Staff: multi factor authentication (MFA) for every back office account, a separate login from the storefront, 15 character passwords, and the admin reachable only from the office and Callum's network (see the admin section below).
  • Password reset: the same message for every address, whether known or not, with the storefront patch from the Solidus advisory applied.

Rate limiting: Rails rate_limit and Rack::Attack

A rate limit says "this client may do this action at most N times in this period". It is the least expensive defence against password guessing, card testing and sign up spam, and since Rails 7.2 it is built into Rails.

The rate_limit method takes to: (the maximum number of requests) and within: (the period), and counts per IP address unless you pass your own by:. Requests over the limit raise ActionController::TooManyRequests, which Rails answers with status 429 unless you pass with:. Several limits on one controller need a name: each29. The counters live in the Rails cache store. That detail matters for Wrenfield: with two application servers, the cache must be shared between them, or each server counts separately and the real limit doubles. A database backed Solid Cache, covered in the chapter on the Rails 8 Solid libraries, is shared, so it works.

# app/controllers/checkouts_controller.rb (excerpt, Solidus starter storefront)
class CheckoutsController < CheckoutBaseController
  # The payment step is where card testing happens. @order is loaded by
  # CheckoutBaseController#load_order, which runs before these filters.
  rate_limit to: 3, within: 10.minutes, only: :update,
    if: -> { params[:state] == "payment" },
    by: -> { @order.number },
    with: -> { redirect_to checkout_state_path("payment"), alert: "Too many payment attempts. Please wait a few minutes." },
    name: "payment per order"

  rate_limit to: 10, within: 1.hour, only: :update,
    if: -> { params[:state] == "payment" },
    name: "payment per ip"

  # ... the generated actions stay as they are
end
# app/controllers/user_sessions_controller.rb (excerpt)
class UserSessionsController < Devise::SessionsController
  rate_limit to: 10, within: 20.minutes, only: :create,
    by: -> { params.dig(:spree_user, :email).to_s.strip.downcase },
    name: "logins per email"
  rate_limit to: 30, within: 20.minutes, only: :create, name: "logins per ip"
end

The payment limits key on the order number first, because a card tester can rotate IP addresses far more easily than it can afford a new order for every card. The login limit keys on the normalised email, so a botnet spreading its attempts across thousands of addresses still hits the per email limit.

Rack::Attack is the other common tool. It is Rack middleware, so it runs before routing and before any controller, and it adds safelists, blocklists and the Fail2Ban style "block after repeated bad requests" filter30. Its README makes the same warning about storage: an in memory store is "mostly ineffective" with several processes, because each counts on its own30. Use rate_limit for rules that need the controller's knowledge (the order, the state), and Rack::Attack for broad rules at the door. A full set of Rack::Attack rules for a Solidus shop, including how to treat verified AI agents, is in good bots, bad bots.

The address you limit by must be the real one

A per IP limit is only as good as request.remote_ip. Behind a proxy, Rails reads the client address from forwarding headers. If it reads the proxy's address instead, every customer shares one address, and the limit throttles the whole shop at once. If it trusts a header the client can set, an attacker chooses their own address and walks past the limit.

Both have happened. Kamal's proxy documentation says that with SSL switched on, kamal proxy stops forwarding the X-Forwarded-For and X-Forwarded-Proto headers unless forward_headers: true is set, which it recommends only "If you are behind a trusted proxy"31. And the Rails advisory CVE-2026-126083 of November 2026 describes how, in Rails 8.1.0 to 8.1.4 with Rack 3, a client supplied Forwarded header could spoof request.remote_ip, and so possibly bypass access controls and rate limits that count by client address, the default by: of rate_limit included32.

Example: checking the address before trusting the limit

Callum logs request.remote_ip for one hour of normal traffic on Wrenfield. The numbers are invented.

What he seesWhat it meansWhat he does
1,840 requests from 1 address, 172.18.0.2Rails sees the proxy, not customersfix forwarding first, or every limit is shop wide
1,840 requests from 410 addressesRails sees real clientsper IP limits work

On Wrenfield the first row appears after a change to the proxy setup. A limit of 10 payment attempts per IP per hour would then have blocked every customer after the tenth payment of the hour. Callum fixes the forwarding, reruns the check, sees the second row, and only then enables the per IP limits. It is a five minute check that saves a self inflicted outage.

A content security policy limits what a script can do

A content security policy (CSP) is a response header that tells the browser which sources of scripts, styles, frames and connections a page may use. If an attacker manages to inject a script tag that loads from their own server, a strict policy makes the browser refuse to run it. It is the second line of defence behind output escaping, and it matters most on the checkout, where a skimming script would read what customers type. The article on PCI DSS explains why the scripts on your payment page are part of your card security obligations.

Rails generates config/initializers/content_security_policy.rb in every new application, fully commented out16. The guide recommends nonces instead of 'unsafe-inline': a nonce is a random value Rails adds to each allowed inline script and to the header, so only those scripts run14. It also supports a report only mode, which reports violations without blocking anything, for moving an existing shop over safely14. Stripe publishes the exact hosts its scripts need: for Stripe.js, https://js.stripe.com and https://*.js.stripe.com for scripts and frames, https://hooks.stripe.com as a frame source for payment methods with redirects such as 3D Secure, and https://api.stripe.com for connections22.

# config/initializers/content_security_policy.rb
Rails.application.configure do
  config.content_security_policy do |policy|
    policy.default_src     :self
    policy.base_uri        :self
    policy.form_action     :self
    policy.frame_ancestors :none          # nobody may frame the shop
    policy.object_src      :none
    policy.font_src        :self, :data
    policy.img_src         :self, :data, "https://*.stripe.com"
    policy.style_src       :self
    policy.script_src      :self, "https://js.stripe.com", "https://*.js.stripe.com"
    policy.frame_src       "https://js.stripe.com", "https://*.js.stripe.com", "https://hooks.stripe.com"
    policy.connect_src     :self, "https://api.stripe.com"
    policy.report_uri      "/csp_reports"
  end

  # A fresh nonce per request for the few inline scripts that remain.
  config.content_security_policy_nonce_generator  = ->(request) { SecureRandom.base64(16) }
  config.content_security_policy_nonce_directives = %w[script-src]

  # Start in report only mode; switch to false once the reports are clean.
  config.content_security_policy_report_only = true
end

Two notes. First, the guide warns that a random nonce per request changes the ETag on every response and so breaks conditional GET caching. The session ID is the alternative it offers14. For a shop with full page caching on product pages, read that passage before choosing. Second, analytics and marketing tags need their own hosts in the policy. On my own site those scripts only load after consent, and the policy lists them anyway, so they work when consent is given.

Example: Wrenfield moves from report only to enforced

The numbers are invented. Callum runs the policy in report only mode for two weeks and counts the reports by cause.

CauseReportsAction
Browser extensions injecting their own scripts1,212ignore, they are the customer's own software
An inline script in the newsletter sign up snippet96move into a JavaScript file
An old embedded video on a buying guide page32add the video host to frame_src
Total1,340

After the two fixes, a third week brings only extension reports. Callum sets content_security_policy_report_only to false and deploys. From then on, a new script added to a page without a policy change shows up in the reports within hours, which is exactly the early warning the payment page needs.

Protecting the admin

The Solidus admin can change prices, issue refunds, export customers and create staff accounts. It deserves more protection than the storefront, and the Rails security guide's section on admin interfaces gives the menu: roles that limit what each person can do, separate login credentials for the admin, and limiting the admin to certain source IP addresses, which the guide describes as not watertight but a great barrier14.

The 2026 Solidus advisories show why roles must be tested, not assumed. One of them let a user with only the user management permission set make themselves a full administrator26. Least privilege, giving each person only the role they need, limits the damage of a phished password. Patching limits the damage of a flawed role.

Example: Wrenfield's admin, before and after

ControlBeforeAfter
Who has the admin rolePriya, Callum and two customer service staffPriya and Callum only
Customer serviceadmin rolea custom role with orders, returns and customers, no settings or users
Sign insame login form as customersseparate admin login with MFA
Networkopen to the internetonly the office address and Callum's VPN, enforced in a Rack::Attack blocklist for /admin
Reviewneverquarterly list of staff accounts and roles, leavers removed the same day

Two customer service staff losing the admin role changes nothing in their daily work, and it removes two of the four accounts that could export every customer's address.

Secrets and their rotation

A secret is anything that grants access: secret_key_base, the Rails master key, the database password, the Stripe and PayPal API keys, the 3PL warehouse's SFTP password, the Google Ads and Meta tokens. In a Kamal deploy they reach the servers through .kamal/secrets, as the Kamal chapter shows.

Rotation means replacing a secret with a new one and retiring the old. Stripe recommends doing it periodically for a practical reason: periodic rotation "confirms that you know where each key is used and that your team can replace a key on short notice"33. Stripe also recommends restricted API keys with only the permissions a component needs, and never putting secret keys in source code33.

The July 2026 Rails advisory shows when rotation stops being routine. After a possible file read, it says: "treat every secret readable by the application process as potentially exposed and change it", listing secret_key_base, the master key and everything it decrypts, storage credentials, database credentials and every third party token11. It adds that changing secret_key_base expires all active sessions, and that an exposed secret must not be kept as a fallback11. A shop that has never rotated anything learns how during an incident, which is the worst time.

Rails can rotate cookie settings so that old cookies still read while new ones are written in the new format, through config.action_dispatch.cookies_rotations14. That is for planned changes. After an exposure, the advisory is clear that old secrets go immediately.

Example: Wrenfield's yearly rotation drill

Callum runs a planned drill every January. The times are invented.

SecretHowMinutesCustomer impact
Stripe secret keyroll the key in the dashboard, update .kamal/secrets, deploy15none
PayPal credentialsnew credentials, update, deploy15none
Database passwordnew password at the managed database, update, deploy20none with a rolling deploy
3PL SFTP passwordagree a time with the warehouse, change both sides25none
Google Ads and Meta tokensreauthorise, update20none
secret_key_basenew value in credentials, deploy15every customer and staff member logged out once

About two hours in total. The secret_key_base step is run at 6am on a Sunday, the quietest hour, and only every second year unless there is a reason. The real output of the drill is a written list of where every secret lives, which is what Callum needs at 2am when an advisory says "change everything".

Card testing: when the checkout works exactly as built

Stripe defines card testing as fraud "where someone tries to determine whether stolen card information is valid so that they can use it to make purchases"34. A script runs many small payments through a shop to find which stolen cards still work. The shop is not the target, it is the tool. The consequences still land on the shop: disputes when some test payments succeed, a high decline rate that makes card issuers treat all your payments as riskier, possible extra fees, and strain on your servers34. Stripe lists the signs: a spike in failed or blocked payments, a spike in API requests failing with status 402, and many small payments "with nonsensical customer names and emails"34.

Stripe's checklist for an active attack has four steps: identify the activity, refund the fraudulent payments to avoid disputes, add mitigations, and monitor whether they work34. It recommends a combination of mitigations rather than one, and says plainly that "simple firewall rules or filters based on a single heuristic such as IP addresses are usually not sufficient"34. The combination it describes includes CAPTCHA on every request that can validate a card, limiting access to the payment form, rate limits on the payment and checkout flow, and Radar rules on velocity where your plan includes them34.

Example: the Saturday night attack on Wrenfield

Everything in this example is invented. In the early hours of Sunday 7 February 2027 a script attacks Wrenfield's checkout. It creates guest orders for the lowest priced product, a set of tea lights at £4.50, and cycles through stolen cards on the payment step. Here are the payment attempts in half hour buckets.

Line chart with invented example figures, in half hour buckets from midnight to 5.30am. Before 1.30am there are 2 or 3 payment attempts per half hour with almost no declines. From 1.30am attempts jump to 180, then 520, 610 and 590, then fall to 410 and 138 by 4am, and back to 1 or 2 from 4.30am. Declines track the attempts closely: 175, 504, 592, 573, 397 and 134 in the attack buckets. In total 2,460 attempts, 2,376 declined, 84 succeeded, 73 of them test charges. Tap or click to open full screen and move around

Across the night there are 2,460 attempts, 2,376 declined and 84 successful. Outside the attack window, between midnight and 1.30am and after 4.30am, 11 payments succeed, all normal customer orders. Inside the window, from 1.30am to 4.30am, 2,448 attempts bring 73 successes, every one a £4.50 tea light order with a nonsense name. The decline rate in the window is

2,3752,448=0.970\frac{2{,}375}{2{,}448} = 0.970

a decline share of 0.9700.970, or 97%, against Wrenfield's normal decline rate of about 4% (also invented). The 73 test charges total 73 × £4.50 = £328.50.

What did it cost? The expected cost of an attack has three parts: fees that are not returned when a payment is refunded, disputes on test charges that are not refunded in time, and staff time.

C=ns f+nu p D+h wC = n_s\,f + n_u\,p\,D + h\,w

Here CC is the cost of the attack, nsn_s the number of successful test charges, ff the fee per payment that is not returned on a refund, nun_u the number of test charges not refunded before the cardholder notices, pp the probability that such a charge becomes a dispute, DD the cost of one dispute (the dispute fee plus the lost payment), hh the staff hours spent, and ww the cost of one staff hour. The idea of weighting a cost by its probability is explained in Foundations: expected value.

With invented values for Wrenfield's provider and staff (ff = £0.25, DD = £20 + £4.50 = £24.50, pp = 0.3, hh = 6, ww = £45), there are two cases. If Priya refunds all 73 test charges on Sunday morning, nu=0n_u = 0:

C=73×0.25+0+6×45=18.25+270=288.25C = 73 \times 0.25 + 0 + 6 \times 45 = 18.25 + 270 = 288.25

If nobody notices until the disputes arrive, nu=73n_u = 73:

C=18.25+73×0.3×24.50+270=18.25+536.55+270=824.80C = 18.25 + 73 \times 0.3 \times 24.50 + 270 = 18.25 + 536.55 + 270 = 824.80

So CC falls from £824.80 to £288.25 when Priya refunds fast, and it also keeps the dispute count down, which matters more in the long run than the money, because card schemes put merchants with high fraud and dispute rates into monitoring programmes34. The decline spike may also make issuers more cautious with Wrenfield's genuine customers for a while, a cost no formula here captures.

Example: what changed after the attack

Callum and Priya write a short postmortem on the Monday and make five changes.

  1. Alert. A business alert fires when more than 25% of payment attempts in 15 minutes are declined, with at least 20 attempts. It would have woken Callum at 1.45am instead of Priya finding it at 9am. How to build such alerts is in the monitoring chapter.
  2. Rate limits. The two rate_limit rules shown above: three payment attempts per order in ten minutes, ten per IP address in an hour. In the attack, 2,448 attempts came through about 410 guest orders, roughly six cards per order. With the per order limit the script would have needed about 816 orders to try the same number of cards, and each new order is work the per IP limit also counts.
  3. Challenge. A CAPTCHA on the payment step after the first failed payment in a session, so a real customer who mistypes once is not punished.
  4. Provider rules. Velocity rules at the payment provider, which see attempts across all its merchants, not only Wrenfield's.
  5. Data. The 73 test orders are flagged in the order data, with the same rule that already excludes the roughly 40 test and staff orders a year, so they do not inflate the revenue figures. Stripe makes the same point: card testing revenue "might look like good, new customers in your data"34.

None of these alone would stop a determined attacker. Together they make Wrenfield a poor tool, and card testers move on to shops that are easier.

When an attack becomes a data breach

A card testing attack uses stolen cards that belong to other people's customers. It usually exposes no personal data held by Wrenfield. Other incidents in this chapter would: the guest token flaw in the Solidus storefront could let an attacker read guest orders with names, emails, addresses and phone numbers19, and the July Rails flaw could expose credentials to the whole database11.

The UK GDPR requires a controller to keep personal data secure with measures appropriate to the risk, which explicitly includes "a process for regularly testing, assessing and evaluating the effectiveness" of those measures (Article 32)35. A monthly routine with a written record is exactly that. When a personal data breach does happen, Article 33 requires notifying the Information Commission (formerly the Information Commissioner's Office, ICO) without undue delay and, where feasible, within 72 hours of becoming aware of it, unless it is unlikely to result in a risk to people's rights and freedoms36. The Information Commission has a page for reporting a breach and a self assessment to decide whether you need to37. Whatever you decide, write down the facts and your reasoning: Article 33 also requires a record of every breach, reported or not36.

Example: three incidents, three decisions

Incident at Wrenfield (invented)Personal data affected?Report to the Information Commission?
Card testing night, stolen cards from elsewhereno data held by Wrenfield exposedno report, but record the incident and the reasoning
Guest token flaw found unpatched, logs show no exploitationpossible, but no evidence of accessusually no report after a documented check of the logs, and record it
Logs show guest orders read through the flawyes: names, addresses, phone numbersyes, within 72 hours, and consider telling the customers

The middle row is why logs matter: without them, "no evidence of access" is a guess. The decision belongs to Priya as the controller, with legal advice if the case is unclear.

The Cyber Resilience Act, if you also sell software

The EU Cyber Resilience Act (CRA), Regulation (EU) 2024/2847, sets security rules for products with digital elements placed on the EU market: hardware and software sold as products, including the software that runs them. According to its Article 71, most of it applies from 11 December 2027, the reporting obligations of Article 14 from 11 September 2026, and the chapter on conformity assessment bodies from 11 June 202638. Under Article 14, a manufacturer must send an early warning of an actively exploited vulnerability in its product "within 24 hours" of becoming aware of it38.

Does it apply to a shop? Recital 12 of the regulation answers the main question: "websites that do not support the functionality of a product with digital elements" are not in its scope38. Wrenfield's shop website is not a product under the CRA. It becomes relevant when a shop also makes software or connected products available on the EU market: a paid app, a downloadable plugin, a smart lamp with firmware. For a UK shop, the CRA applies only to products made available in the EU. The full picture of who must prepare, and how, is in the article on the Cyber Resilience Act.

Example: what is in and out for Wrenfield

What Wrenfield doesIn CRA scope?
Runs its Solidus shop for customers in the UK and the EUno, a website that supports no product
Sells third party smart bulbs to EU customersmainly the manufacturer's and importer's duties. A reseller has its own, more limited duties, and who counts as importer for a UK seller is a question for legal advice
Sells its own room planning app to EU customersyes, Wrenfield would be the manufacturer

The routine in this chapter, with its advisories, time to patch and release register, is a good part of what a manufacturer under the CRA needs anyway. The 24 hour clock is not.

OWASP ASVS as the yardstick

A routine tells you how to keep a shop patched. It does not tell you whether the shop was built securely in the first place. For that, the OWASP Application Security Verification Standard (ASVS) is the checklist I build web applications to. Its current version is 5.0.0, published on 30 May 202539. It sets out what a secure application must do, chapter by chapter, at three levels of depth. OWASP ASVS explained covers the levels, the chapters and how they are used.

Example: mapping Wrenfield's routine to ASVS

Callum takes the sections of this chapter and asks, for each, which ASVS chapter it serves and whether the evidence exists.

This chapterASVS areaEvidence Wrenfield keeps
Patching and end of lifecomponents and dependenciesrelease register, time to patch table
Brakeman and the classicsencoding, injection, validationCI history, ignore file with reasons
Login rules and rate limitsauthenticationconfiguration and request specs
Admin protection and rolesaccess controlrole list, quarterly review notes
CSPweb frontend securitypolicy file, report history
Secrets rotationsecret managementrotation log

The gaps that remain, such as security logging detail, become next quarter's work.

My view

Most of the security of a small Rails shop comes from three habits, not from products. First, stay on supported versions, and check the end of life dates every month, because the expensive surprise is not a new flaw but discovering you have been outside support for half a year. Second, read the advisories as well as running the scanners, because in 2026 the advisories that needed a shop's own code changed were invisible to every tool. Third, put limits and alerts on the few actions where money moves: login, password reset, payment and the admin.

I would not buy a security product before these three are in place. A web application firewall or a bot management service can help a shop that is already patched and limited. It cannot make up for a forgotten Rails 7.1 app in 2027.

And I would budget for it honestly: about 30 hours a year for the routine at Wrenfield's size, plus the fast lane, plus a real upgrade every year or two. That is far less than one bad night with an unpatched flaw, and it is the part of running a shop that no customer ever sees until it is missing.

Conclusion

A Rails shop stays secure year after year through a routine: subscribe to the Rails, Ruby and Solidus announcements, patch serious flaws within 14 days and the rest monthly, and check every month that Ruby, Rails and Solidus are still supported. Run bundler audit, a JavaScript audit and Brakeman on every build and once a week on a schedule, and read the advisories too, because copied storefront code and operating system packages slip past every scanner. Keep the Rails defaults against CSRF, XSS, SQL injection and mass assignment switched on, and test your authorisation rules, because broken access control is now the top risk. Put rate limits on login, password reset and payment, check that the address you limit by is real, add a content security policy in report only mode first, lock the admin down, and practise rotating your secrets before an advisory forces you to. When the checkout is abused anyway, refund fast, alert on decline spikes, and write the incident down, because the record is both your evidence and your next improvement.

Not sure whether your shop runs supported versions, or what your last security release was? Book the free workshop: we check your versions, your audits and your checkout limits together, and the first two weeks of work are on me.

Sources

  1. 1.

    Department for Science, Innovation and Technology, Cyber security breaches survey 2025/2026, official statistics, published 30 April 2026, gov.uk, https://www.gov.uk/government/statistics/cyber-security-breaches-survey-20252026/cyber-security-breaches-survey-20252026

  2. 2.

    National Cyber Security Centre, Cyber Essentials: Requirements for IT Infrastructure v3.3, April 2026, section on security update management, ncsc.gov.uk, https://www.ncsc.gov.uk/files/cyber-essentials-requirements-for-it-infrastructure-v3-3.pdf

  3. 3.

    Rails, Maintenance Policy for Ruby on Rails, Rails Guides, checked 23 November 2026, https://guides.rubyonrails.org/maintenance_policy.html

  4. 4.

    Rails, Maintenance policy, list of currently supported releases, rubyonrails.org, checked 23 November 2026, https://rubyonrails.org/maintenance

  5. 5.

    Ruby, Ruby Maintenance Branches, ruby-lang.org, checked 23 November 2026, https://www.ruby-lang.org/en/downloads/branches/

  6. 6.

    Solidus, Security policy, supported versions and disclosure process, Solidus guides, checked 23 November 2026, https://guides.solidus.io/policies/security/

  7. 7.

    RubyGems.org, rails, all versions with release dates, checked 23 November 2026, https://rubygems.org/gems/rails/versions

  8. 8.

    Rails, Security policy, rubyonrails.org, checked 23 November 2026, https://rubyonrails.org/security

  9. 9.

    Rails, Security advisories of rails/rails, GitHub, counted for 2026 on 23 November 2026, https://github.com/rails/rails/security/advisories

  10. 10.

    Solidus, Security advisories of solidusio/solidus, GitHub, counted for 2026 on 23 November 2026, https://github.com/solidusio/solidus/security/advisories

  11. 11.

    Rails, Possible arbitrary file read and remote code execution in Active Storage variant processing, CVE-2026-66066, GHSA-xr9x-r78c-5hrm, published 29 July 2026, GitHub, https://github.com/rails/rails/security/advisories/GHSA-xr9x-r78c-5hrm

  12. 12.

    Solidus, Arbitrary payment amounts via the orders and payments APIs enable order underpayment, GHSA-c2fq-w6qj-3hj4, published 9 September 2026, GitHub, https://github.com/solidusio/solidus/security/advisories/GHSA-c2fq-w6qj-3hj4

  13. 13.

    Solidus, Storefront password reset endpoint allows for account enumeration, GHSA-mhwq-2v9w-r659, published 7 October 2026, GitHub, https://github.com/solidusio/solidus/security/advisories/GHSA-mhwq-2v9w-r659

  14. 14.

    Rails, Securing Rails Applications, Rails Guides, checked 23 November 2026, https://guides.rubyonrails.org/security.html

  15. 15.

    rubysec, bundler-audit README, GitHub, version 0.9.3, checked 23 November 2026, https://github.com/rubysec/bundler-audit

  16. 16.

    Rails, application generator templates of Rails 8.1.4.1 (github/ci.yml, config/ci.rb, bin/bundler-audit, config/bundler-audit.yml, content_security_policy.rb, filter_parameter_logging.rb), GitHub, checked 23 November 2026, https://github.com/rails/rails/tree/v8.1.4.1/railties/lib/rails/generators/rails/app/templates

  17. 17.

    npm, npm audit, npm Docs, CLI version 11, checked 23 November 2026, https://docs.npmjs.com/cli/v11/commands/npm-audit

  18. 18.

    GitHub, Dependabot options reference, GitHub Docs, checked 23 November 2026, https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference

  19. 19.

    Solidus, Guest token fixation in Solidus Storefront enables cart takeover and order data disclosure, GHSA-g82m-w3m9-rrwh, published 9 September 2026, GitHub, https://github.com/solidusio/solidus/security/advisories/GHSA-g82m-w3m9-rrwh

  20. 20.

    Justin Collins and contributors, Brakeman README and documentation (confidence levels, ignoring false positives), GitHub, version 8.1.1, checked 23 November 2026, https://github.com/presidentbeef/brakeman

  21. 21.

    Rails, ActiveRecord::Sanitization::ClassMethods, sanitize_sql_like, Rails API, checked 23 November 2026, https://api.rubyonrails.org/classes/ActiveRecord/Sanitization/ClassMethods.html

  22. 22.

    Stripe, Integration security guide (TLS, webhooks, Content Security Policy), Stripe Docs, checked 23 November 2026, https://docs.stripe.com/security/guide

  23. 23.

    Solidus, Stored cross-site scripting in Solidus product descriptions, GHSA-x943-j5hw-mr2w, published 7 October 2026, GitHub, https://github.com/solidusio/solidus/security/advisories/GHSA-x943-j5hw-mr2w

  24. 24.

    Solidus, Over permissive attributes in Solidus admin, GHSA-q5w8-wf94-jc29, published 5 November 2026, GitHub, https://github.com/solidusio/solidus/security/advisories/GHSA-q5w8-wf94-jc29

  25. 25.

    OWASP Foundation, OWASP Top 10:2025, checked 23 November 2026, https://top10.owasp.org/2025

  26. 26.

    Solidus, Users with UserManagement permissions can assign themselves the admin role or change an admin's password, GHSA-rw5f-4cm4-pc4m, published 7 October 2026, GitHub, https://github.com/solidusio/solidus/security/advisories/GHSA-rw5f-4cm4-pc4m

  27. 27.

    Solidus, solidus_auth_devise, app/models/spree/user.rb, GitHub, version 2.6.2, checked 23 November 2026, https://github.com/solidusio/solidus_auth_devise/blob/main/app/models/spree/user.rb

  28. 28.

    National Institute of Standards and Technology, SP 800-63B-4, Digital Identity Guidelines: Authentication and Authenticator Management, section 3.1.1.2 Password Verifiers and rate limiting, 2025, https://pages.nist.gov/800-63-4/sp800-63b.html

  29. 29.

    Rails, ActionController::RateLimiting::ClassMethods, rate_limit, Rails API and source of Rails 8.1.4.1, checked 23 November 2026, https://api.rubyonrails.org/classes/ActionController/RateLimiting/ClassMethods.html

  30. 30.

    rack, rack-attack README, GitHub, version 6.8.0, checked 23 November 2026, https://github.com/rack/rack-attack

  31. 31.

    Kamal, Proxy configuration (forward_headers, ssl), kamal-deploy.org, checked 23 November 2026, https://kamal-deploy.org/docs/configuration/proxy/

  32. 32.

    Rails, Possible IP spoofing in Action Dispatch RemoteIp, CVE-2026-126083, GHSA-2gff-2mmg-m73p, published 4 November 2026, GitHub, https://github.com/rails/rails/security/advisories/GHSA-2gff-2mmg-m73p

  33. 33.

    Stripe, Best practices for managing secret API keys, Stripe Docs, checked 23 November 2026, https://docs.stripe.com/keys-best-practices

  34. 34.

    Stripe, Protect yourself from card testing, Stripe Docs, checked 23 November 2026, https://docs.stripe.com/disputes/prevention/card-testing

  35. 35.

    UK GDPR, Article 32, Security of processing, legislation.gov.uk, https://www.legislation.gov.uk/eur/2016/679/article/32

  36. 36.

    UK GDPR, Article 33, Notification of a personal data breach to the Commissioner, legislation.gov.uk, https://www.legislation.gov.uk/eur/2016/679/article/33

  37. 37.

    Information Commissioner's Office, Report a breach, ico.org.uk, checked 23 November 2026, https://ico.org.uk/for-organisations/report-a-breach/

  38. 38.

    Regulation (EU) 2024/2847 of the European Parliament and of the Council of 23 October 2024 (Cyber Resilience Act), recital 12, Article 14 and Article 71, Official Journal of the European Union, EUR-Lex, https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32024R2847

  39. 39.

    OWASP Foundation, Application Security Verification Standard 5.0.0, published 30 May 2025, https://asvs.owasp.org/

Shelter

I’m running the London Marathon for Shelter. Sunday 25 April 2027

My personal fundraiser. Shelter, the National Campaign for Homeless People Limited, registered charity 263710 (England and Wales) and SC002327 (Scotland), registered with the Fundraising Regulator.