Skip to content

chore(deps): update dependency typeorm to v0.3.26 [security]#120

Open
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-typeorm-vulnerability
Open

chore(deps): update dependency typeorm to v0.3.26 [security]#120
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/npm-typeorm-vulnerability

Conversation

@renovate

@renovate renovate Bot commented Mar 21, 2024

Copy link
Copy Markdown
Contributor

ℹ️ Note

This PR body was truncated due to platform limits.

This PR contains the following updates:

Package Change Age Confidence
typeorm (source) ^0.2.18^0.3.26 age confidence
typeorm (source) 0.2.370.3.26 age confidence

SQL injection in typeORM

CVE-2022-33171 / GHSA-fx4w-v43j-vc45

More information

Details

The findOne function in TypeORM before 0.3.0 can either be supplied with a string or a FindOneOptions object. When input to the function is a user-controlled parsed JSON object, supplying a crafted FindOneOptions instead of an id string leads to SQL injection. NOTE: the vendor's position is that the user's application is responsible for input validation.

Severity

  • CVSS Score: 9.8 / 10 (Critical)
  • Vector String: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


TypeORM vulnerable to SQL injection via crafted request to repository.save or repository.update

CVE-2025-60542 / GHSA-q2pj-6v73-8rgj

More information

Details

Summary

SQL Injection vulnerability in TypeORM before 0.3.26 via crafted request to repository.save or repository.update due to the sqlstring call using stringifyObjects default to false.

Details

Vulnerable Code:

const { username, city, name} = req.body;
const updateData = {
    username,
    city,
    name,
    id:userId
  }; // Developer aims to only allow above three fields to be updated    
const result = await userRepo.save(updateData);

Intended Payload (non-malicious):

username=myusername&city=Riga&name=Javad

OR

{username:\"myusername\",phone:12345,name:\"Javad\"}

SQL query produced:

UPDATE `user` 
SET `username` = 'myusername', 
    `city` = 'Riga', 
    `name` = 'Javad' 
WHERE `id` IN (1);

Malicious Payload:

username=myusername&city[name]=Riga&city[role]=admin

OR

{username:\"myusername\",city:{name:\"Javad\",role:\"admin\"}}

SQL query produced with Injected Column:

UPDATE `user` 
SET `username` = 'myusername', 
    `city` = `name` = 'Javad', 
    `role` = 'admin' 
WHERE `id` IN (1);

Above query is valid as city = name = Javad is a boolean expression resulting in city = 1 (false). “role” column is injected and updated.

Underlying issue was due to TypeORM using mysql2 without specifying a value for the stringifyObjects option. In both mysql and mysql2 this option defaults to false. This option is then passed into SQLString library as false. This results in sqlstring parsing objects in a strange way using objectToValues.

Severity

  • CVSS Score: 8.9 / 10 (High)
  • Vector String: CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:L/SC:L/SI:H/SA:L/E:P

References

This data is provided by the GitHub Advisory Database (CC-BY 4.0).


Release Notes

typeorm/typeorm (typeorm)

v0.3.26

Compare Source

Notes:

  • When using MySQL, TypeORM now connects using stringifyObjects: true, in order to avoid a potential security vulnerability
    in the mysql/mysql2 client libraries. You can revert to the old behavior by setting connectionOptions.extra.stringifyObjects = false.
  • When using SAP HANA, TypeORM now uses the built-in pool from the @sap/hana-client library. The deprecated hdb-pool
    is no longer necessary and can be removed. See https://typeorm.io/docs/drivers/sap/#data-source-options for the new pool options.
Bug Fixes
Features
Performance Improvements

v0.3.25

Compare Source

Bug Fixes
Features

v0.3.24

Compare Source

Bug Fixes
Features
Performance Improvements
  • improve save performance during entities update (15de733)

v0.3.23

Compare Source

⚠️ Note on a breaking change

This release includes a technically breaking change (from this PR) in the behaviour of the delete and update methods of the EntityManager and Repository APIs, when an empty object is supplied as the criteria:

await repository.delete({})
await repository.update({}, { foo: 'bar' })
  • Old behaviour was to delete or update all rows in the table
  • New behaviour is to throw an error: Empty criteria(s) are not allowed for the delete/update method.

Why?

This behaviour was not documented and is considered dangerous as it can allow a badly-formed object (e.g. with an undefined id) to inadvertently delete or update the whole table.

When the intention actually was to delete or update all rows, such queries can be rewritten using the QueryBuilder API:

await repository.createQueryBuilder().delete().execute()
// executes: DELETE FROM table_name
await repository.createQueryBuilder().update().set({ foo: 'bar' }).execute()
// executes: UPDATE table_name SET foo = 'bar'

An alternative method for deleting all rows is to use:

await repository.clear()
// executes: TRUNCATE TABLE table_name
Bug Fixes
Features
Performance Improvements

v0.3.22

Compare Source

Bug Fixes
Features
Reverts

v0.3.21

Compare Source

Bug Fixes
Performance Improvements

v0.3.20

Compare Source

Bug Fixes
Features
Reverts

v0.3.19

Compare Source

Bug Fixes
  • fixed Cannot read properties of undefined (reading 'sync') caused after glob package upgrade

v0.3.18

Compare Source

Bug Fixes
Features
Performance Improvements
BREAKING CHANGES
  • With node-oracledb the thin client is used as default. Added a option to use the thick client. Also added the option to specify the instant client lib
  • MongoDB: from the previous behavior of returning a result with metadata describing when a document is not found.
    See: https://github.com/mongodb/node-mongodb-native/blob/HEAD/etc/notes/CHANGES_6.0.0.md
  • new nullable embeds feature introduced a breaking change which might enforce you to update types on your entities to | null,
    if all columns in your embed entity are nullable. Since database queries now return embedded property as null if all its column values are null.

v0.3.17

Compare Source

Bug Fixes

v0.3.16

Compare Source

Bug Fixes

Note

PR body was truncated to here.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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 these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies Pull requests that update a dependency file label Mar 21, 2024
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] chore(deps): update dependency typeorm to v0.3.0 [security] - autoclosed Dec 8, 2024
@renovate renovate Bot closed this Dec 8, 2024
@renovate renovate Bot deleted the renovate/npm-typeorm-vulnerability branch December 8, 2024 18:42
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] - autoclosed chore(deps): update dependency typeorm to v0.3.0 [security] Dec 8, 2024
@renovate renovate Bot reopened this Dec 8, 2024
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from c46580d to b740d0f Compare December 8, 2024 22:33
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from b740d0f to 75b13d3 Compare August 10, 2025 15:11
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 75b13d3 to 8e90a66 Compare August 19, 2025 18:34
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 8e90a66 to 6bab28c Compare September 25, 2025 16:44
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 6bab28c to c790c63 Compare November 19, 2025 00:40
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from c790c63 to d39a703 Compare January 19, 2026 16:28
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from d39a703 to 21d0880 Compare February 12, 2026 13:38
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 21d0880 to f3f012a Compare March 5, 2026 19:00
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] chore(deps): update dependency typeorm to v0.3.0 [security] - autoclosed Mar 27, 2026
@renovate renovate Bot closed this Mar 27, 2026
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] - autoclosed chore(deps): update dependency typeorm to v0.3.0 [security] Mar 30, 2026
@renovate renovate Bot reopened this Mar 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch 2 times, most recently from f3f012a to d346e76 Compare March 30, 2026 21:24
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from d346e76 to e2029f9 Compare April 15, 2026 14:21
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] chore(deps): update dependency typeorm [security] Apr 15, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from e2029f9 to 1bc27e9 Compare April 16, 2026 19:03
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.0 [security] Apr 16, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 1bc27e9 to be3d87e Compare April 19, 2026 10:39
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] chore(deps): update dependency typeorm [security] Apr 19, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from be3d87e to 9a46782 Compare April 19, 2026 16:53
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.0 [security] Apr 19, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 9a46782 to 8253117 Compare April 21, 2026 21:48
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] chore(deps): update dependency typeorm [security] Apr 21, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 9e873b6 to 6c196e8 Compare April 30, 2026 18:36
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.0 [security] Apr 30, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 6c196e8 to 74e71f7 Compare May 12, 2026 12:49
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] chore(deps): update dependency typeorm [security] May 12, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 74e71f7 to 40d67f4 Compare May 12, 2026 19:09
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.0 [security] May 12, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 40d67f4 to 7b10450 Compare May 13, 2026 05:52
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.0 [security] chore(deps): update dependency typeorm to v0.3.26 [security] May 13, 2026
@renovate

renovate Bot commented May 13, 2026

Copy link
Copy Markdown
Contributor Author

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: root@undefined
npm ERR! Found: reflect-metadata@0.1.13
npm ERR! node_modules/reflect-metadata
npm ERR!   dev reflect-metadata@"0.1.13" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer reflect-metadata@"^0.1.14 || ^0.2.0" from typeorm@0.3.26
npm ERR! node_modules/typeorm
npm ERR!   dev typeorm@"0.3.26" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /runner/cache/others/npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /runner/cache/others/npm/_logs/2026-06-11T23_04_36_062Z-debug-0.log

@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 7b10450 to f598dae Compare May 14, 2026 17:52
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.26 [security] chore(deps): update dependency typeorm [security] May 14, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from f598dae to 337fe69 Compare May 14, 2026 21:32
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.26 [security] May 14, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 337fe69 to 29e0ba9 Compare May 18, 2026 10:57
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.26 [security] chore(deps): update dependency typeorm [security] May 18, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 29e0ba9 to 5890a06 Compare May 18, 2026 16:07
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.26 [security] May 18, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 5890a06 to 233f2d9 Compare May 22, 2026 20:58
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.26 [security] chore(deps): update dependency typeorm [security] May 22, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 233f2d9 to 2247f81 Compare May 23, 2026 01:47
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.26 [security] May 23, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 2247f81 to 509c15c Compare May 28, 2026 16:53
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.26 [security] chore(deps): update dependency typeorm [security] May 28, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 509c15c to 6d54806 Compare May 29, 2026 00:10
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.26 [security] May 29, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from 6d54806 to d674b40 Compare June 1, 2026 20:44
@renovate renovate Bot changed the title chore(deps): update dependency typeorm to v0.3.26 [security] chore(deps): update dependency typeorm [security] Jun 1, 2026
@renovate renovate Bot force-pushed the renovate/npm-typeorm-vulnerability branch from d674b40 to f7a2311 Compare June 2, 2026 03:26
@renovate renovate Bot changed the title chore(deps): update dependency typeorm [security] chore(deps): update dependency typeorm to v0.3.26 [security] Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants