fix(deps): update dependency @adonisjs/lucid to v21 [security]#582
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update dependency @adonisjs/lucid to v21 [security]#582renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
361669f to
81e0cf9
Compare
81e0cf9 to
605fc5a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
18.3.0→21.8.2GitHub Vulnerability Alerts
CVE-2026-22814
Summary
Description
A Mass Assignment (CWE-915) vulnerability in AdonisJS Lucid may allow a remote attacker who can influence data that is passed into Lucid model assignments to overwrite the internal ORM state. This may lead to logic bypasses and unauthorized record modification within a table or model. This affects @adonisjs/lucid through version 21.8.1 and 22.x pre-release versions prior to 22.0.0-next.6. This has been patched in @adonisjs/lucid versions 21.8.2 and 22.0.0-next.6.
Details
A vulnerability in the
BaseModelImplclass of@adonisjs/lucidmay allow an attacker to overwrite internal class properties (such as$isPersisted,$attributes, or$isDeleted) when passing plain objects to model assignment methods.The library relies on a
this.hasOwnProperty(key)check to validate assignment targets. However, because internal ORM state properties are initialized as instance properties, they pass this check. Consequently, if an attacker can influence specific keys (like$isPersisted) into the payload passed tomerge()or$consumeAdapterResult(), they can hijack the ORM's internal logic.The exposed internal properties include:
$attributes: The raw storage for model data.$isPersisted: Controls whethersave()performs anINSERTor anUPDATE.$original: Stores the original state of the record used to calculate changes.$isDeleted: Prevents operations on deleted models.This issue propagates to the entire write surface of the library, including:
fillandmerge.create,createQuietly,firstOrNew, andfirstOrCreate.updateOrCreate.createMany,createManyQuietly,fetchOrNewUpMany,fetchOrCreateMany, andupdateOrCreateMany.Impact
Applications are vulnerable if they pass unvalidated data or validated data that retains unknown properties to the model. This occurs because internal keys exist as instance properties, causing them to pass the
hasOwnPropertycheck and bypass Lucid's default rejection of unknown properties.Applications utilizing strict allow lists for input validation that discard unknown properties are not affected.
For example, if a developer passes
request.all(),request.except()or a schema withallowUnknownPropertiestoModel.create(), the ORM's internal logic can be hijacked. Because theModel.create()>save()decision is based on$isPersisted, andmerge()can assign to the own-property$isPersisted, an attacker who can inject"$isPersisted": trueinto the payload can forcesave()to take the UPDATE branch rather than the INSERT branch, while setting$attributescan bypass validators or field restrictions.Patches
This issue has been patched in @adonisjs/lucid version
21.8.2and22.0.0-next.6. Please upgrade to this version or later.Developers can mitigate this issue by strictly validating model inputs with an allow list that drops unknown keys if possible.
Release Notes
adonisjs/lucid (@adonisjs/lucid)
v21.8.2: Prevent mass assignment vulnerabilityCompare Source
Security update for CVE-2026-22814.
This release fixes a mass assignment vulnerability in Lucid that could allow user input to override internal ORM state properties.
The issue was caused by relying on
hasOwnPropertychecks during model assignments, which unintentionally allowed setting internal properties like$attributes,$original, or$isPersistedwhen passing untrusted input to methods such asfill,merge, orcreate.Applications that already properly validate and whitelist input data before passing it to Lucid models are not affected.
v21.8.1: Support VineJS v4Compare Source
Bug Fixes
What's Changed
Full Changelog: adonisjs/lucid@v21.8.0...v21.8.1
v21.8.0: Use natural sort when executing seeders and display migration filename during error in compact modeCompare Source
Bug Fixes
Features
What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v21.7.0...v21.8.0
v21.7.0: Extend sideload data, perform model.save without triggering hooks and bug fixesCompare Source
Bug Fixes
Features
v21.6.1: Fix issue for disableTransactions flag being ignored for schema classesCompare Source
Bug Fixes
What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v21.6.0...v21.6.1
v21.6.0: Handful of small improvementsCompare Source
Features
error.modelfor E_ROW_NOT_FOUND; (#1081) (334186f)What's Changed
error.modelforE_ROW_NOT_FOUND; by @radiumrasheed in #1081New Contributors
Full Changelog: adonisjs/lucid@v21.5.1...v21.6.0
v21.5.1: Fix model.transaction method to behave exactly as db.transctionCompare Source
Bug Fixes
Full Changelog: adonisjs/lucid@v21.5.0...v21.5.1
v21.5.0: Improvements to unique and exists rule and add isDirty methodCompare Source
Bug Fixes
Features
What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v21.4.0...v21.5.0
v21.4.0: Export relationships query clients and allow instanceName config propertyCompare Source
Features
What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v21.3.0...v21.4.0
v21.3.0: Bug fixes and new featuresCompare Source
loadOncemethod to preload a relationship only when its not already preloaded.--compact-outputinmigration:resetandmigration:refreshcommands.AdapterandModelPaginatorfrom the ORM.Bug Fixes
Features
What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v21.2.0...v21.3.0
v21.2.0: Pin strtok3 and fix relationship query builder to apply constraints on subqueriesCompare Source
0699d0645e43c1c131bc7What's Changed
Full Changelog: adonisjs/lucid@v21.1.1...v21.2.0
v21.1.1: Fix - Cleanup connection resources when using read replicasCompare Source
14f345a2e002b7a9eac4baa0a5732aee01a2d25ef0Full Changelog: adonisjs/lucid@v21.1.0...v21.1.1
v21.1.0: Display dialect names in configure promptsCompare Source
596c153v21.0.1: Fix for last releaseCompare Source
1afc648Full Changelog: adonisjs/lucid@v21.0.0...v21.0.1
v21.0.0: Support for libSQL and new health checksCompare Source
This release adds first-class support for libSQL and removes all options + types + methods related to legacy way of doing health checks. Instead, you must use the following two classes to register health checks with AdonisJS v6.
Breaking changes
config.healthCheckpropertyconnection.getReportmethod.connectionManager.reportmethod.ReportNodetype.Deprecations
connection.dialectNamein favor ofconnection.clientName. TheclientNamerefers to the npm clients you can use with Knex anddialectNamerefers to the Lucid dialects. One dialect can be used with multiple clients. For example, the MySQL dialect can be used withmysqlandmysql2clients.Commits
8a4df1c2d9697b7fedbfe95f11d11b32dca0373e7f32f377e44da18c9dbd7fcbdc32b5Full Changelog: adonisjs/lucid@v20.6.0...v21.0.0
v20.6.0: Improvements to the DateTime comparison when using "orCreate" methodsCompare Source
In this release, we improve the comparison logic used by
firstOrCreate,firstOrNew, andupdateOrCreatemethods to properly compare Luxon DateTime instances when finding or persisting a new row.Commits
94b666a669bdb392ed475ba5961b7315d0e52906a5b084678781c4795d87cf8What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v20.5.1...v20.6.0
v20.5.1: Add clause variant to findBy methodCompare Source
Latest
20.5.0was missing some commits.This release is published only as a patch since
20.5.0was released a few minutes ago.059c472c22f019196c97c4012129v20.5.0: Add step option to the migratorCompare Source
What's Changed
Full Changelog: adonisjs/lucid@v20.3.1...v20.5.0
v20.4.0: Add support for pretty printing debug queries and findMany helper methodCompare Source
Related documentation for few features
Commits
8e1f3a7f989fb6f3976b94427c8de0a2b03deb0052ea41f578c333e067ba4622754e5cWhat's Changed
Full Changelog: adonisjs/lucid@v20.3.0...v20.4.0
v20.3.1: Correct call to logger.error when configuring the packageCompare Source
2754e5cv20.3.0: Bug fixes and new API on BaseModelCompare Source
This release fixes the
dropAllTablesimplementation for SQLite so that we can drop tables even when unsafe mode is disabled.Also, a new model method
lockForUpdatehas been added. This method refetches the model instance from the database and locks the row for update. This allows you to perform updates without running into race-conditions. For example:Commits
1b47ba7703e6b5018c4ce5c18c76What's Changed
Full Changelog: adonisjs/lucid@v20.2.0...v20.3.0
v20.2.0: Addexistsanduniquebindings toVineNumber& drop postgres domainCompare Source
What's Changed
existsanduniquebindings toVineNumberby @Tahul in #998New Contributors
Full Changelog: adonisjs/lucid@v20.1.0...v20.2.0
v20.1.0: Add DatabaseTestUtilsCompare Source
This release adds the DatabaseTestUtils class, which includes some helpers for writing tests that interacts your database, such as migration/seeding/truncating and global transactions to keep a clean state between each test.
See full documentation here : https://docs.adonisjs.com/guides/database-tests
Commits
9c845f6629ca32Full Changelog: adonisjs/lucid@v20.0.0...v20.1.0
v20.0.0: Switch default naming strategy to camelCase and add support for nulls treatment in order by clauseCompare Source
Breaking change
Switching back to
snake_casenaming strategyIf you like to keep using the old snake case naming strategy, then you can copy-paste the following code inside a service provider of your application.
New features
Add support for defining treatment of null values in
orderBymethod. For example:The above method calls will add compile to
ORDER BY expires_at desc NULLS LASTandORDER BY last_used_at desc NULLS FIRSTsql statementsCommits
b4af5934777edc@types/pluralizefrom dependenciescee062cd33b9b17e35cc2d327871c835376718c68f71708b8What's Changed
@types/pluralizefrom dependencies by @targos in #987Full Changelog: adonisjs/lucid@v19.0.0...v20.0.0
v19.0.0: Stable major releaseCompare Source
Please consult the following releases to learn more about the breaking changes.
Commits
f664a0724a14cf57d9ca70ee3ee6ae090bd06422e12790fe90fac231498c308947e85119dad5bf72c9910417d8414befae62ae085c5a9f51b7ec9d4What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v18.4.1...v19.0.0
v18.4.2: Change default env variable valuesCompare Source
0417d84Full Changelog: adonisjs/lucid@v18.4.1...v18.4.2
v18.4.1: Relations can now be nullableCompare Source
What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v18.4.0...v18.4.1
v18.4.0: Add support for disabling locks during migrationsCompare Source
5562cef0e51132ecb7d7792f0de6f59ef9e05f28e49bf8f248955b12What's Changed
New Contributors
Full Changelog: adonisjs/lucid@v18.3.0...v18.4.0
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.