From August through November 2026, the AdonisJS team rolled out a large series of updates across the framework's core packages. If you skim the changelog, new features like conditional dependencies, a dry-run mode for rate limiters, and support for the new QUERY HTTP method immediately catch the eye. However, you should start from the other end.
Hidden inside this autumn wave are six security patches, and three of them are rated High. The maintainers also backported the critical fixes to v6. Even if you don't plan to move to Redis 11 or OpenTelemetry 3 yet, you shouldn't put off a standard npm update. Let's walk through which holes were closed, what new tools landed in the codebase, and which subtle traps to watch for during the upgrade.
Official AdonisJS framework banner featuring key ecosystem modules (Source: adonisjs.com)
Six Vulnerabilities That Require an Immediate Update
Let's start with the sharpest risks: packages that accept incoming internet traffic. That's where bugs were found that could crash a server with a single malformed request or hijack a user's OAuth login.
The request body parser @adonisjs/bodyparser took the biggest hit (fixed in 11.0.5 for v7 and 10.1.6 for v6). Two High-severity issues converged there. First, GHSA-8w45-cghr-9rh4 targets JavaScript's prototype chain (prototype-chain DoS). If a multipart request sends a part named __proto__ or constructor, the parser accesses internal properties on a plain JS object while looking up a handler and crashes the server process without any authentication. Second, GHSA-jf2h-r4qp-9rp8 stems from the bundled @poppinss/multiparty fork, which missed upstream security patches from the original multiparty for four CVEs (CVE-2026-8159, CVE-2026-87908, CVE-2026-8162, CVE-2026-8161). A crafted multipart request could trigger ReDoS, exhaust memory, or freeze the process.
When updating bodyparser, watch out for one subtle change: file.clientName now decodes %2F back into a plain slash /. If your code passes the uploaded filename directly into file.move(), sanitize it and strip path separators before saving, or you might accidentally write outside the uploads directory.
The third High-severity flaw was found in the OAuth module @adonisjs/ally (6.3.1 / 5.1.2, GHSA-j577-w94j-8p3p). It involves Login CSRF — forging an OAuth sign-in. Normally, when auth starts, the server stores a temporary state cookie in the user's browser and checks it against the URL parameter on callback. Previously, if that cookie was missing altogether, the check could let the request through. An attacker could slip a login completion link for their own account to a victim and quietly bind it to the victim's session. Now, a missing state cookie always counts as a mismatch.
Two more patches fixed Moderate-severity issues:
- In @adonisjs/http-server (
9.3.0/8.2.3,GHSA-2m6q-8v3h-jqww,CVE-2026-107718), route parameters insiderouter.makeUrl()andredirect().toRoute()now run throughencodeURIComponent. Before this, the first dynamic path segment could be abused for an open redirect to an external domain. Version9.3.2also rewrote request path decoding in linear time: previously, a 16 KB URL burned roughly 6.5 ms of CPU time on a single request. - In @adonisjs/inertia (
5.0.4,GHSA-p3rg-578c-4g4r), the@inertiaEdge tag now escapes<inside the page's JSON payload. Before the patch, saved user text containing a closing tag could break the initial HTML load and open a path to script injection.
Two more packages round out the list and are worth updating right away. In @adonisjs/cors 3.0.1, preflight request header checks moved to a linear algorithm: previously, a single 13.7 KB header could block the event loop for about 10 ms. Meanwhile, @adonisjs/mail 10.4.1 upgraded to Nodemailer 10 to close vulnerabilities from the v9 branch.
Conditional DI and Dry-Run Mode for Rate Limiter
Once security is handled, you can look at the features that save nerves in day-to-day work. The first one lives in the IoC/DI container, AdonisJS's built-in dependency registry that injects classes into your services and controllers.
Previously, binding two different implementations of a service and switching them on the fly for a specific user or feature flag was awkward: you had to build manual wrapper factories. In the new release (already covered in the DI documentation), the container.if() method arrived. It checks a condition each time a dependency resolves and swaps in the matching implementation.
import type { ApplicationService } from '@adonisjs/core/types'
import { HttpContext } from '@adonisjs/core/http'
import PaymentService from '#services/payment_service'
import StripeProvider from '#services/stripe_provider'
import BetaPaymentProvider from '#services/beta_payment_provider'
export default class AppProvider {
constructor(protected app: ApplicationService) {}
register() {
// Base provider for all other requests
this.app.container.bind(PaymentService, () => {
return new StripeProvider()
})
// Conditional override for users with the feature flag
this.app.container
.if(async (resolver) => {
// Ace commands and workers have no HttpContext
if (!resolver.hasBinding(HttpContext)) {
return false
}
const ctx = await resolver.make(HttpContext)
const flags = ctx.auth.user?.featureFlags
return flags?.includes('new-payment') === true
})
.bind(PaymentService, () => {
return new BetaPaymentProvider()
})
}
}
Notice the resolver.hasBinding(HttpContext) check at the start of the callback. It's a classic trap: an HTTP controller always runs inside HttpContext, but a background job or Ace CLI command might also need PaymentService where no request context exists. If you forget this line, the container crashes instead of falling back to the base StripeProvider.
You can attach as many conditional bindings as you want to a single key. The container checks them in order and picks the first match. Good news for tests: container.swap() still overrides any condition, so your existing fakes and mocks won't break. And if a heavy client like a search engine should only be created once per app lifetime, use .singleton() instead of .bind().
// Condition runs every time, but the instance is created once
this.app.container
.if(() => env.get('SEARCH_DRIVER') === 'typesense')
.singleton(SearchService, (resolver) => {
return resolver.make(TypesenseSearchService)
})
In this setup, the container evaluates the condition on every call, but runs the TypesenseSearchService factory once and caches the instance.
The second long-awaited feature landed in @adonisjs/limiter: the .dryRun() mode (see the rate limiting docs). Anyone who has shipped rate limits to a live app knows that sinking feeling when you misjudge a threshold by 2x and legitimate users suddenly hit 429 Too Many Requests.
Dry-run mode solves this cleanly. You chain .dryRun() onto a rule, and the limiter tracks traffic in separate counters (adding an internal _dry suffix to the store key, such as api_dry_ip_127.0.0.1). It doesn't block real users, doesn't send X-RateLimit-* headers, and doesn't fire the limitExceeded callback. Instead, every threshold breach emits limit:exceeded on the event bus with dryRun: true.
import emitter from '@adonisjs/core/services/emitter'
import logger from '@adonisjs/core/services/logger'
import { limiter } from '#start/limiter'
// Count traffic in dry-run mode without blocking requests
export const apiThrottle = limiter.define('api', () => {
return limiter.allowRequests(100).every('1 hour').dryRun()
})
// Log who would have been blocked in production
emitter.on('limit:exceeded', ({ key, response, dryRun }) => {
if (dryRun) {
logger.warn(
{ key, consumed: response.consumed },
'request would have been throttled'
)
}
})
You can pass a boolean to .dryRun(), which makes it easy to tie to an environment variable and toggle without code edits. Once the logs confirm your threshold is fair, remove .dryRun(), and the live limiter starts with clean counters rather than inheriting test stats. The limit:exceeded event also fires in normal production mode on every rejected request, so you can wire it straight into metrics.
Sessions Without Leaks and 'Logout Ghosts'
The @adonisjs/session package (detailed in the session docs) fixed two nasty issues that tend to surface in production sooner or later.
The first one is about data storage. Previously, AdonisJS signed session payloads in Redis or a database table. Signing prevented tampering, not reading: anyone with read access to Redis could see session fields in plain text. Now you can set encrypt: true in the store config, and the framework encrypts session data using the built-in encryption service and APP_KEY.
Technical diagram of session protection in @adonisjs/session: encrypting data with APP_KEY in Redis and preventing logout ghosts during concurrent request races.
import { defineConfig, stores } from '@adonisjs/session'
export default defineConfig({
age: '2h',
// Protection against concurrent request race conditions
clearWithBrowser: true,
refreshCookie: false,
renewMissingSessionId: true,
stores: {
redis: stores.redis({
connection: 'main',
// Encrypt session contents using APP_KEY
encrypt: true,
}),
},
})
With encrypt: true, data in Redis or the database is stored encrypted rather than merely signed. Meanwhile, the three flags above protect the app from overwriting closed sessions.
As soon as you enable encrypt: true on a live project, all existing unencrypted sessions in Redis or the database become unreadable. Users will be logged out once and will need to sign in again. Schedule this flag for a quiet release window and make sure APP_KEY is safely stored in your environment secrets.
The second problem is trickier: a race condition between concurrent HTTP requests. Picture a common scene: a user has two tabs open, clicks 'Log out' in one, while a slow background request is still running in the other. The logout request properly destroys the session in Redis. Half a second later, the slow request from the second tab finishes and writes the deleted session back. You get a 'logout ghost': the user logged out, yet the session came back to life.
In the new @adonisjs/session, the Redis, database, file, and DynamoDB stores automatically stop overwriting destroyed sessions, so you don't need any code changes there. To close the browser-cookie side, two flags from the snippet above were added: refreshCookie: false (the cookie is only sent when the session ID changes, so a late response won't restore an old ID) and renewMissingSessionId: true (a deleted session ID is never reused). Because refreshCookie: false stops extending cookie Max-Age on every request, the docs recommend pairing it with clearWithBrowser: true.
For forms, a handy session.flashInputErrors() method was added. Previously, returning a manual field error (say, an email already taken in the database) without throwing a validation exception meant touching inputErrorsBag by hand. Now it takes two lines, and both Edge's @inputError tag and the Inertia adapter pick it up automatically.
// Flash a field error without throwing a validation exception
session.flashInputErrors({
email: 'This email is already registered',
})
return response.redirect().back()
Package setup also improved: node ace add @adonisjs/session --store=redis now configures the chosen store right away instead of defaulting to cookies (and --store=database generates the sessions table migration automatically).
HTTP QUERY Method, Ace DB Commands, and Alias Fixes
Web developers have struggled for years with complex searches packed with filters and nested conditions. Over GET, parameters outgrow the URL bar and leak into proxy logs; over POST, you lose caching and safe-read semantics. In June 2026, the IETF finally approved RFC 10008 for the HTTP QUERY method. Essentially, it is GET with a request body: safe (doesn't mutate server state), idempotent (repeating it yields the same result without side effects), and cacheable, while sending filters in the body.
AdonisJS quickly added full QUERY support to the router, URL helpers (urlFor.query() and signedUrlFor.query()), and bodyparser. The parser's default allowedMethods list already includes 'QUERY'. If your config/bodyparser.ts defines that array manually, add 'QUERY' by hand.
import router from '@adonisjs/core/services/router'
import Product from '#models/product'
// Safe, cacheable search with complex filters in the body
router.query('/products/search', async ({ request }) => {
const { category } = request.body()
return Product.query().where('category', category)
})
The @adonisjs/lucid ORM also received two welcome additions. First, node ace db:create and node ace db:drop now work for PostgreSQL, MySQL, SQL Server, Redshift, SQLite, and LibSQL (for file-based engines they simply create or remove the file). They accept --connection=mysql, db:create skips databases that already exist, and db:drop asks for confirmation in production unless you pass --force.
Second, a rare but nasty bug with model column aliases was fixed. By default, Lucid prefixes column names with the table name in queries: a url column in semafor becomes semafor_url. If that same table happens to have a real semafor_url column, values get mixed up. Now you can set a custom prefix on the model via static columnAliasPrefix = 'semafor_alias'.
# Create a database for a specific connection
node ace db:create --connection=mysql
# Add a validated secret (excluded from .env.example)
node ace env:add STRIPE_SECRET --type=secret
Several smaller updates help anyone building packages or custom project layouts. In codemods, addImportAlias, createDirectory, and defineEnvValidations({ overwrite }) now work without tight coupling to @adonisjs/assembler, and EnvLoader.getPaths() returns the env file paths. In Core, indexEntities() reads custom paths for controllers, events, listeners, and transformers from directories in adonisrc.ts (requires @adonisjs/assembler 8.6.2+). Meanwhile, redirect() gained { forwardQueryString: true }, paginate() added a third argument for the page parameter name, the static middleware added prefixes, Vite got serverBuildDirectory, and telemetry now tags SSE responses (including Transmit) with http.connection_type=sse.
Three Surprising Speedups Under the Hood
The AdonisJS team covered general performance benchmarks separately, but the autumn release also includes three optimizations spotted almost by accident. The chart below shows the speedups, and the real story is why the code was slow in the first place.
Speedup of Internal AdonisJS Operations
The biggest jump happened in Lucid's preload on large many-to-many relations (the benchmark loaded skills for 2,000 users through a pivot table). Previously, the ORM scanned the entire array of loaded related rows for every parent record — classic quadratic complexity that quietly slows pages down as tables grow. Rewriting the matching logic to group by key in a single pass wiped out the bottleneck.
The story with nested resource transformers (the test serialized a page of 20 users with profiles, posts, and comments) is even funnier. Every transform() call eagerly captured a full JavaScript stack trace 'just in case' an undefined slipped in and the developer needed a nice error trace. Capturing a stack in V8 is expensive, and healthy code rarely throws. Now the stack trace is only collected when an error actually occurs.
Finally, container.make() got faster for plain classes with empty constructors, such as standard controllers without injected dependencies. Instead of pushing them through the full dependency-lookup pipeline, the container now instantiates them directly.
The Big Three: Redis 11, OpenTelemetry 2, and Queue 0.7
Minor and security patches can go out right away, but the three major package releases (@adonisjs/redis 11.0.0, @adonisjs/otel 2.0.0, and @adonisjs/queue 0.7.0) need a proper plan. The table summarizes their requirements and breaking changes.
Modular diagram of three major AdonisJS updates: @adonisjs/redis 11 with RESP3 protocol, @adonisjs/otel 2 on SDK 3, and @adonisjs/queue 0.7 with schedule migration.
| Package | Release Date | Min. Node.js | Key Internal Change | What to Check |
|---|---|---|---|---|
@adonisjs/redis 11 | Sep 2, 2026 | 20+ | Moves to ioredis 6, RESP3 protocol by default | Packages using ioConnection directly, protocol: 2 if incompatible |
@adonisjs/otel 2 | Nov 11, 2026 | 22.15.0+ | OpenTelemetry JS SDK 3, @opentelemetry/api 1.10 | Imports, processor arrays, HTTP metrics in seconds |
@adonisjs/queue 0.7 | Oct 18, 2026 | — | @boringnode/queue 0.9.0, new schedule format | Full worker shutdown, queue:migrate --timezone, defaultJobOptions |
There is no rush with @adonisjs/redis 11: v10 stays on ioredis 5, and the session and queue packages support both. If you do upgrade, remember three things. First, ioredis 6 defaults to the RESP3 protocol (Redis's newer wire protocol with extended types and push messages). If your code or proxy expects the older format, switch back to RESP2 with protocol: 2. Second, the default retryStrategy now uses exponential backoff with jitter, and TCP keepAlive runs every 30 seconds (your custom retryStrategy still takes priority). Third, any third-party package touching ioConnection directly must also support ioredis 6.
// config/redis.ts — fall back to RESP2 if needed
main: {
host: env.get('REDIS_HOST'),
port: env.get('REDIS_PORT'),
protocol: 2,
},
With @adonisjs/otel 2, the main trap is mixing OpenTelemetry SDK 2 and SDK 3 packages in the same node_modules. The default config/otel.ts works as-is, but custom exporters and processors require migrating singular spanProcessor, metricReader, and logRecordProcessor fields to arrays with an options object, and updating imports from @opentelemetry/sdk-trace-base and @opentelemetry/sdk-trace-node to @opentelemetry/sdk-trace.
// Before in @adonisjs/otel 1.x:
// spanProcessor: new BatchSpanProcessor(exporter),
// After in @adonisjs/otel 2.0:
spanProcessors: [new BatchSpanProcessor({ exporter })],
Also check your Grafana or Datadog dashboards: OpenTelemetry moved to stable semantic conventions for metric and tag names. HTTP duration metric names changed, and values are now recorded in seconds instead of milliseconds. Old alerts will silently stop firing until you update them.
The strictest migration belongs to @adonisjs/queue 0.7. Internally, @boringnode/queue jumped from 0.6 to 0.9.0, changing how schedules and deduplication IDs are stored. You cannot run old and new workers side by side, and a new worker won't pick up jobs from old SQL tables until the migration runs.
Follow a strict order: stop all workers and every process that dispatches jobs or schedules, run the idempotent migration command, and only then boot the new version. If you use Lucid on MySQL or Kysely on PostgreSQL/MySQL, older versions stored schedule dates without a time zone — the command will refuse to guess and requires --timezone.
# After stopping all workers, migrate queue tables
node ace queue:migrate --timezone=Europe/Paris
# Local development now supports hot reload for workers
node ace queue:work --hmr
After upgrading, check defaultJobOptions: maxRetries, retry, timeout, and failOnTimeout are now actually applied to jobs (some could previously be ignored). In return for a careful migration, you get three great perks: on SIGTERM, queue:work waits for active jobs to finish before closing connections (no more duplicate runs on deploy), --all-queues and --adapter flags arrived, and local dev finally supports --hmr.
Hidden Behavior Shifts Before Running npm update
Even within minor updates under your existing package.json ranges, this release carries a few behavior changes that can surprise production or break a test.
The loudest fix hit limiter.clear() on the Redis store. Before the patch, it sent FLUSHDB to Redis, wiping the entire database — including sessions, cache, and queues if they shared the instance. Now clear() only deletes the limiter's own keys. One catch: if your Redis limiter store doesn't set keyPrefix, calling clear() will throw an error.
The second key fix makes Lucid transactions honest. First, isolationLevel in db.transaction() finally applies to manual transactions: if you already had repeatable read or serializable configured, the database will start returning serialization failure errors, and your code needs to retry those transactions. Second, trx.commit() and db.transaction(callback) now reject the promise if PostgreSQL or another DB rejects COMMIT. Previously, the promise resolved, and after('commit') hooks (like sending an order email) fired for data the database had actually rolled back.
A few smaller surprises are worth checking with your test suite:
- In
@adonisjs/cors,node ace configure @adonisjs/corsnow generatesorigin: app.inDev ? true : []. Check your oldconfig/cors.ts: if it still hasorigin: true, list allowed domains explicitly for production. @adonisjs/bodyparsernow returns HTTP400withE_INVALID_QUERY_CONTENT_TYPEwhen aQUERYrequest arrives without aContent-Typeheader or with an empty one.- In
@adonisjs/inertia, type checking forpage propswith optional keys inshared propsis back — TypeScript may flag old mismatches inrender(). - In
http-server,response.attachment()no longer wraps simple ASCII filenames in quotes (attachment; filename=hello.html, addingfilename*for non-ASCII), andredirect().withQs(...).toPath('/users?page=2')merges query parameters cleanly instead of adding a second?. - In Ace's CLI parser, flag arrays stay strings (
--tags 1e3gives['1e3'], not[1000]), and repeated scalar flags (--port=1 --port=2) take the last value2instead of[1, 2]. Inmake:model,-tnow means--transformer(previously-ccreated a transformer instead of a controller). i18n.formatRelativeTime()now truncates past intervals toward zero (61 minutes agobecomes1 hour agoinstead of2 hours ago), and Vite skips building an empty SSR bundle in production whenserverEntryPointsisn't set.
If your project predates September 2026, switch root imports from @adonisjs/core to subpath entry points to trim unused dependencies from your build:
// Before: import { indexEntities } from '@adonisjs/core'
import { indexEntities } from '@adonisjs/core/generators'
// Before: import { Ignitor, prettyPrintError } from '@adonisjs/core'
import { Ignitor, prettyPrintError } from '@adonisjs/core/ignitor'
Here is a short checklist for rolling out the update safely without missing a step.
Safe AdonisJS Upgrade Checklist
- Run
npm updateand verify you get the patched versions of@adonisjs/http-server(>=9.3.2/>=8.2.3),@adonisjs/ally(>=6.3.1/>=5.1.2),@adonisjs/bodyparser(>=11.0.5/>=10.1.6),@adonisjs/inertia(>=5.0.4),@adonisjs/cors(>=3.0.1), and@adonisjs/mail(>=10.4.1). - Check
file.clientNamesanitization beforefile.move(),keyPrefixon your Redis limiter, allowed origins inconfig/cors.ts, andCOMMITerror handling in Lucid transactions. - Run
npm auditandnode ace test, updating strict tests forContent-Dispositionheaders and Inertia prop types if needed. - In a separate release after a DB backup, upgrade the major packages: check Node.js 20+ and RESP3 for Redis 11, move to Node.js 22.15.0+ and seconds-based metric dashboards for OTel 2, and stop all workers before running
node ace queue:migrate --timezone=...for Queue 0.7.




