Skip to content

chore(security): review dependency vulnerabilities - #20

Open
dex-the-ai wants to merge 1 commit into
mainfrom
chore/security-review-20261117-t_5ccc3afa
Open

dex-the-ai wants to merge 1 commit into
mainfrom
chore/security-review-20261117-t_5ccc3afa

Conversation

@dex-the-ai

Copy link
Copy Markdown

Summary

This PR fixes 161 of 163 known advisories found by the native tools:

  • Rails app (bundler-audit): Gemfile.lock is gitignored, so every bundle install resolves rails ~> 7.1.3 to the newest 7.1.x, which today is Rails 7.1.6. bundler-audit reports 28 advisories against that resolution (Action Pack, Action View, Active Storage, Active Support, Action Mailbox), including one critical Active Storage file read/write bug. Rails 7.1 is end-of-life and none of these have a 7.1 fix. Several of the newest ones are not fixed in 7.2 either. The fixed lines are 8.0.5.2+ and 8.1.4.1+. This PR moves the Gemfile to gem 'rails', '~> 8.1.4', '>= 8.1.4.1'. The app code and config.load_defaults 7.1 are unchanged, and the full request-spec suite passes against Capella. The Dockerfile's gem install rails -v '7.1' preinstall line now uses 8.1.4.1 to match.
  • Docs site (docusaurus/, npm audit): 135 advisories in the docs build toolchain. Fixed 133 by bumping the exact @docusaurus/* pins 3.4.0 -> 3.10.2 (same major) and running npm audit fix (no --force), plus two small overrides:
    • serialize-javascript ^7.1.4: used by copy-webpack-plugin / css-minimizer at build time. Same API, and 6.x has an RCE advisory with no 6.x fix.
    • tinypool ^2.2.0: Docusaurus 3.10 added tinypool@^1 for its optional SSG worker-thread mode, and 1.x has critical prototype-pollution-to-RCE advisories. That mode (future.faster.ssgWorkerThreads) is off in this site, so tinypool isn't loaded at all.
    • engines.node goes from >=18.0 to >=20.0, because Docusaurus 3.10 needs Node 20. The deploy workflow already uses Node 22.

Advisories fixed

Rails gems (bundler-audit, fresh bundle lock on Ruby 3.4.1)

Gem Direct/transitive Current (fresh resolve) Now Count Max severity Advisories
actionmailbox transitive (via rails) 7.1.6 8.1.4.1 1 low GHSA-5957-c7qm-m469
actionpack transitive (via rails) 7.1.6 8.1.4.1 6 high GHSA-2586-8ghr-69fj, GHSA-gmj8-hvj3-49mw, GHSA-r9jg-fmfx-2gv6, GHSA-rwvh-fw6r-pwvp, GHSA-wm3x-v3qw-4jh3, GHSA-x6mj-8jx9-qhqv
actionview transitive (via rails) 7.1.6 8.1.4.1 5 medium CVE-2026-33168, GHSA-2p2f-4rq4-gjwc, GHSA-68p9-83h6-5wpj, GHSA-rq8q-p985-fjq7, GHSA-v6rj-xm57-3p59
activestorage transitive (via rails) 7.1.6 8.1.4.1 12 critical CVE-2026-33173, CVE-2026-33174, CVE-2026-33195, CVE-2026-33202, CVE-2026-33658, CVE-2026-66066, GHSA-3f4q-8x5m-76v8, GHSA-3w93-6hmw-whh4, CVE-2026-122006, GHSA-hfr4-8rjc-97m2, GHSA-p2pm-g2h6-7j5j, GHSA-v924-7rp8-4mxh
activesupport transitive (via rails) 7.1.6 8.1.4.1 4 high CVE-2026-33169, CVE-2026-33170, CVE-2026-33176, GHSA-8474-xrp6-wh69

In plain words: XSS in Action View helpers, strong-parameters bypass and session/cookie issues in Action Pack, path traversal / file read / possible RCE in Active Storage (the app does not use Active Storage, but Rails loads it), and ReDoS/XSS in Active Support helpers.

Docs site (docusaurus/package-lock.json, npm audit)

One row per package.

Package Direct/transitive Current Now Max severity Advisories
@babel/core transitive 7.24.5 7.29.13 low CVE-2026-49356
@babel/helpers transitive 7.24.5 7.29.14 moderate CVE-2025-27789
@babel/plugin-transform-modules-systemjs transitive 7.24.1 7.29.8 high CVE-2026-44728
@babel/runtime transitive 7.24.5 7.29.14 moderate CVE-2025-27789
@babel/runtime-corejs3 transitive 7.24.5 removed moderate CVE-2025-27789
ajv transitive 6.12.6, 8.13.0 6.15.0, 8.20.0 moderate CVE-2025-69873
body-parser transitive 1.20.2 1.20.9 high CVE-2026-111181, CVE-2024-45590, CVE-2026-12590
brace-expansion transitive 1.1.11 1.1.22 high CVE-2026-13149, CVE-2026-102276, CVE-2026-33750, CVE-2026-14257, CVE-2026-102277, CVE-2026-102278, CVE-2026-69152, CVE-2025-5889
braces transitive 3.0.2 3.0.3 high CVE-2024-4068
browserslist transitive 4.23.0 4.29.6 high CVE-2026-73088, CVE-2026-73089
colord transitive 2.9.3 2.14.0 moderate CVE-2026-85062
compression transitive 1.7.4 1.8.2 high CVE-2026-87776
cookie transitive 0.6.0 0.7.2 low CVE-2024-47764
cross-spawn transitive 7.0.3 7.0.6 high CVE-2024-21538
estree-util-value-to-estree transitive 3.1.1 3.5.0 moderate CVE-2025-32014
express transitive 4.19.2 4.22.3 low CVE-2024-43796
follow-redirects transitive 1.15.6 1.16.3 moderate CVE-2026-40895
http-proxy-middleware transitive 2.0.6 2.0.12 high CVE-2025-32996, CVE-2026-55602, CVE-2025-32997, CVE-2024-21536
image-size transitive 1.1.1 2.1.0 high CVE-2025-71319, CVE-2025-71330
joi transitive 17.13.1 17.13.9 high CVE-2026-118772, CVE-2026-92599, CVE-2026-122131, CVE-2026-84367, CVE-2026-48038, CVE-2026-90771
js-yaml transitive 3.14.1, 4.1.0 4.3.2 high CVE-2026-84375, CVE-2026-59869, GHSA-5p4m-2wfm-xmqj, CVE-2026-53550, CVE-2025-64718
launch-editor transitive 2.6.1 2.14.2 high CVE-2026-112942, CVE-2026-112943, CVE-2024-52011, CVE-2026-112944, CVE-2026-53632
lodash transitive 4.17.21 4.18.1 high CVE-2026-4800, CVE-2025-13465
mdast-util-to-hast transitive 13.1.0 13.2.2 moderate CVE-2025-66400
micromatch transitive 4.0.5 4.0.8 moderate CVE-2024-4067
minimatch transitive 3.1.2 3.1.5 high CVE-2026-27904, CVE-2026-26996, CVE-2026-27903
nanoid transitive 3.3.7 3.3.20 high CVE-2026-67214, CVE-2026-67213, CVE-2024-55565, CVE-2026-73086
node-forge transitive 1.3.1 removed high CVE-2026-33896, CVE-2026-118776, CVE-2026-118780, CVE-2026-118775, CVE-2026-118778, CVE-2025-66031, CVE-2026-119186, CVE-2025-12816, CVE-2026-33891, CVE-2026-119190, CVE-2025-66030, CVE-2026-125335, CVE-2026-125333, CVE-2026-119192, CVE-2026-118777, CVE-2026-118779, CVE-2026-33894, CVE-2026-119188, CVE-2026-118774, CVE-2026-119189, CVE-2026-118781, CVE-2026-119187, CVE-2026-125334, CVE-2026-118782, CVE-2026-33894, CVE-2026-33895, CVE-2026-119191, CVE-2026-125332
on-headers transitive 1.0.2 1.1.0 low CVE-2025-7339
path-to-regexp transitive 0.1.7, 1.8.0, 2.2.1 0.1.13, 1.9.0, 3.3.0 high CVE-2024-45296, CVE-2024-45296, CVE-2024-52798
picomatch transitive 2.3.1 2.3.2 high CVE-2026-33672, CVE-2026-33671
postcss transitive 8.4.38 8.5.33 high CVE-2026-45623, CVE-2026-69153, CVE-2026-41305, CVE-2026-73646
postcss-selector-parser transitive 6.0.16 6.1.6, 7.2.1 moderate CVE-2026-104844
prismjs transitive 1.29.0 1.30.0 moderate CVE-2024-53382
proxy-addr transitive 2.0.7 2.0.8 critical CVE-2026-90711
qs transitive 6.11.0 6.16.2 moderate CVE-2026-82417, CVE-2026-110816, CVE-2025-15284, CVE-2026-2391
send transitive 0.18.0 0.19.2 low CVE-2024-43799
serialize-javascript transitive 6.0.2 7.1.4 high GHSA-5c6j-r48x-rmvq, CVE-2026-115754, CVE-2026-34043
serve-static transitive 1.15.0 1.16.3 low CVE-2024-43800
shell-quote transitive 1.8.1 1.12.0 critical CVE-2026-13311, CVE-2026-9277
source-map-js transitive 1.2.0 1.2.2 high CVE-2026-93749
svgo transitive 3.2.0 3.3.5 high CVE-2026-73650, CVE-2026-84369, CVE-2026-84370, CVE-2026-29074
webpack transitive 5.91.0 5.112.2 moderate CVE-2025-68157, CVE-2024-43788, CVE-2025-68458
webpack-dev-middleware transitive 5.3.4 7.4.6 high CVE-2026-76844
webpack-dev-server transitive 4.15.2 5.2.7 moderate CVE-2025-30359, CVE-2026-6402, CVE-2025-30360, CVE-2026-14620, CVE-2026-14631, CVE-2026-9595
websocket-driver transitive 0.7.4 0.7.5 critical CVE-2026-54490, CVE-2026-54466
ws transitive 7.5.9, 8.17.0 7.5.14, 8.23.0 high CVE-2024-37890, CVE-2026-45736, CVE-2026-48779
yaml transitive 1.10.2 removed moderate CVE-2026-33532

Remaining advisories not fixed

Advisory Package Why it is not fixed
GHSA-fc5q-39xc-vjpf (high) picomatch (docs build) Affects every published version (<=4.0.7), and no fix is released. Build-time only.
GHSA-w5hq-g745-h8pq (moderate) uuid 8.3.2 via webpack-dev-server -> sockjs (docs dev server) sockjs 0.3.24 is the latest release and pins uuid 8. Only used by docusaurus start, and sockjs doesn't use the affected buf argument.

Validation

Area Command Result
Rails bundle lock + bundle-audit check (ruby:3.4.1, current main Gemfile) 28 advisories (Rails 7.1.6)
Rails bundle install with this Gemfile (ruby:3.4.1) Rails 8.1.4.1, couchbase 3.9.1, couchbase-orm from git, rswag 2.17.0
Rails RAILS_ENV=test bundle exec rake couchbase:setup_indexes (Capella) 5 indexes processed, 0 failed
Rails bundle exec rspec spec/requests/api/v1 (same as CI, live Capella travel-sample) 27 examples, 0 failures
Rails CI=true bundle exec rake rswag:specs:swaggerize 59 examples, 0 failures (regenerated swagger.yaml not committed)
Rails bundle-audit check after No vulnerabilities found
Rails rails s + Playwright: Swagger UI at /api-docs, then GET /api/v1/airlines/{id} "Try it out" with airline_10 200, 40-Mile Air returned from Capella
Docs npm ci, npm run build, npm run typecheck (Node 26) build success, typecheck clean
Docs DOCUSAURUS_SSG_WORKER_THREAD_COUNT=2 npx docusaurus build success (the site does not enable the worker-thread mode, so tinypool stays unused)
Docs npx docusaurus serve + Playwright on a tutorial page renders
Docs npm audit before / after 135 -> 2

The docs build warns about a broken link to /docs/intro from the navbar/home page. That comes from existing content (onBrokenLinks: 'warn'), not from this change.

Evidence

Swagger UI on Rails 8.1.4.1
swagger ui

GET /api/v1/airlines/airline_10 against Capella
get airline

Walkthrough video: walkthrough.webm

Docs site (Docusaurus 3.10.2 build)
docs page

Overlapping Dependabot PRs

Risk / rollback

  • Rails 7.1 -> 8.1 is a major framework bump. The app is a small API-only Rails app with request specs covering every airline/airport/route endpoint, and all of them pass against live Capella. config.load_defaults stays at 7.1, so framework defaults don't change. Because Gemfile.lock isn't committed, users already get the newest matching gems on every install.
  • Docusaurus 3.4 -> 3.10 is a minor bump for the docs site only. The site builds and typechecks cleanly.

To roll back, revert this commit.

Reviewer + Slack notification

  • Reviewers: requested @shyam-cb (owner in tutorials.json; the repo has no CODEOWNERS file).
  • Slack: owner notification sent through the dependency PR notifier.

Hermes Kanban: board couchbase-examples, task t_5ccc3afa

🤖 Generated with Claude Code

- Gemfile: rails ~> 7.1.3 -> ~> 8.1.4, >= 8.1.4.1. Rails 7.1 is
  end-of-life and the current Rails advisories are only fixed in
  8.0.5.2+ / 8.1.4.1+. Dockerfile preinstall updated to match.
- docusaurus: @docusaurus/* 3.4.0 -> 3.10.2, npm audit fix, overrides
  for serialize-javascript ^7.1.4 and tinypool ^2.2.0, engines node >=20.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant