{"id":"CVE-2025-60542","revision":null,"records":[{"revision":"94e03c57916a4fa2976ce68020d00a15","observedAt":"2026-10-23T15:48:27.903+00:00","statement":{"source":"cve-program","id":"CVE-2025-60542","aliases":[],"title":"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.","description":"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.","state":0,"publishedAt":"2025-10-29T00:00:00+00:00","modifiedAt":"2025-10-30T20:28:41.544+00:00","affected":[{"ecosystem":"Vendor product","name":"n/a","ranges":[],"versions":[],"rawVersionEvidence":"{\n                    \"vendor\": \"n/a\",\n                    \"product\": \"n/a\",\n                    \"versions\": [\n                        {\n                            \"version\": \"n/a\",\n                            \"status\": \"affected\"\n                        }\n                    ]\n                }"}],"metrics":[],"references":["https://github.com/typeorm/typeorm/releases?q=security&expanded=true","https://github.com/typeorm/typeorm/pull/11574","https://github.com/typeorm/typeorm/releases/tag/0.3.26","https://medium.com/@alizada.cavad/cve-2025-60542-typeorm-mysql-sqli-0-3-25-a1b32bc60453"],"sourceUrl":"https://www.cve.org/CVERecord?id=CVE-2025-60542","license":"CVE Program Terms of Use","key":"cve-program:CVE-2025-60542","identifiers":["CVE-2025-60542"]},"retained":false,"historicalAffected":[]},{"revision":"25aeca922fa14033a8b401b7943a8d6b","observedAt":"2026-11-01T00:16:41.021+00:00","statement":{"source":"euvd","id":"EUVD-2025-36689","aliases":["CVE-2025-60542","GHSA-q2pj-6v73-8rgj"],"title":"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.","description":"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.","state":0,"publishedAt":null,"modifiedAt":null,"affected":[],"metrics":[{"system":"EUVD CVSS 3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"severity":null}],"references":["https://github.com/typeorm/typeorm/releases?q=security&expanded=true","https://github.com/typeorm/typeorm/pull/11574","https://github.com/typeorm/typeorm/releases/tag/0.3.26","https://medium.com/@alizada.cavad/cve-2025-60542-typeorm-mysql-sqli-0-3-25-a1b32bc60453"],"sourceUrl":"https://euvd.enisa.europa.eu/vulnerability/EUVD-2025-36689","license":"ENISA EUVD · source terms and attribution apply","enrichment":{"sourceStatus":null,"weaknesses":[],"productCriteria":[],"sourceDates":{"datePublished":"Oct 29, 2025, 12:00:00 AM","dateUpdated":"Oct 30, 2025, 8:28:41 PM"},"relatedAdvisories":[{"id":"WID-SEC-W-2025-2702","title":"Red Hat Enterprise Linux (Developer Hub): Schwachstelle ermöglicht Manipulation von Dateien","vulnerabilityIds":["CVE-2025-60542"]},{"id":"RHSA-2025:22861","title":"Red Hat Security Advisory: Red Hat Developer Hub 1.8.1 release.","vulnerabilityIds":["CVE-2025-60542","CVE-2025-66031"]},{"id":"RHSA-2025:22404","title":"Red Hat Security Advisory: Red Hat Developer Hub 1.7.3 release.","vulnerabilityIds":["CVE-2025-60542"]}],"note":"EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON."},"key":"euvd:EUVD-2025-36689","identifiers":["EUVD-2025-36689","CVE-2025-60542","GHSA-q2pj-6v73-8rgj"]},"retained":false,"historicalAffected":[]},{"revision":"e05d3650aa2443dfa0a1e38852735c23","observedAt":"2026-10-29T04:48:13.686+00:00","statement":{"source":"nvd","id":"CVE-2025-60542","aliases":[],"title":"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.","description":"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.","state":0,"publishedAt":"2025-10-29T16:15:34.057+00:00","modifiedAt":"2026-10-27T12:10:00.343+00:00","affected":[],"metrics":[{"system":"CVSS 3.1 · 134c704f-9b21-4f2e-91b3-4a467353bcc0 · Secondary","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":6.5,"severity":"MEDIUM"}],"references":["https://github.com/typeorm/typeorm/pull/11574","https://github.com/typeorm/typeorm/releases/tag/0.3.26","https://github.com/typeorm/typeorm/releases?q=security&expanded=true","https://medium.com/@alizada.cavad/cve-2025-60542-typeorm-mysql-sqli-0-3-25-a1b32bc60453"],"sourceUrl":"https://nvd.nist.gov/vuln/detail/CVE-2025-60542","license":"NIST NVD usage terms; underlying source attribution retained","enrichment":{"sourceStatus":"Deferred","weaknesses":["CWE-89"],"productCriteria":[],"sourceDates":{"published":"2025-10-29T16:15:34.057","lastModified":"2026-10-27T12:10:00.343"},"relatedAdvisories":[],"note":"NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON."},"key":"nvd:CVE-2025-60542","identifiers":["CVE-2025-60542"]},"retained":false,"historicalAffected":[]},{"revision":"b92b77d3e4ba4dccba77fdc4f73c3852","observedAt":"2026-10-24T13:17:17.793+00:00","statement":{"source":"osv","id":"GHSA-q2pj-6v73-8rgj","aliases":["CVE-2025-60542"],"title":"TypeORM vulnerable to SQL injection via crafted request to repository.save or repository.update","description":"### Summary\n\nSQL 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.\n\n### Details\n\nVulnerable Code:\n\n```js\nconst { username, city, name} = req.body;\nconst updateData = {\n    username,\n    city,\n    name,\n    id:userId\n  }; // Developer aims to only allow above three fields to be updated    \nconst result = await userRepo.save(updateData);\n```\n\nIntended Payload (non-malicious):\n\n\n`\nusername=myusername&city=Riga&name=Javad\n`\n\n_OR_\n\n`{username:\\\"myusername\\\",phone:12345,name:\\\"Javad\\\"}\n`\n\nSQL query produced:\n\n```sql\nUPDATE `user` \nSET `username` = 'myusername', \n    `city` = 'Riga', \n    `name` = 'Javad' \nWHERE `id` IN (1);\n\n```\n\nMalicious Payload:\n\n`username=myusername&city[name]=Riga&city[role]=admin\n`\n\n_OR_\n\n`{username:\\\"myusername\\\",city:{name:\\\"Javad\\\",role:\\\"admin\\\"}}\n`\n\nSQL query produced with Injected Column:\n\n```sql\nUPDATE `user` \nSET `username` = 'myusername', \n    `city` = `name` = 'Javad', \n    `role` = 'admin' \nWHERE `id` IN (1);\n\n```\n_Above query is valid as `city` = `name` = `Javad` is a boolean expression resulting in `city` = 1 (false). “role” column is injected and updated._\n\nUnderlying issue was due to TypeORM using mysql2 [without specifying a value for the stringifyObjects option](https://github.com/typeorm/typeorm/blob/0.3.25/src/driver/mysql/MysqlConnectionOptions.ts). In both mysql and mysql2 this [option defaults to false](https://github.com/sidorares/node-mysql2/blob/e359f454a76ba5dc31b91adf7bdb4099ca317bb5/lib/connection_config.js#L124). This option is then passed into [SQLString library as false](https://github.com/sidorares/node-mysql2/blob/e359f454a76ba5dc31b91adf7bdb4099ca317bb5/lib/base/connection.js#L524). This results in sqlstring [parsing objects in a strange way using objectToValues.](https://github.com/mysqljs/sqlstring/blob/cd528556b4b6bcf300c3db515026935dedf7cfa1/lib/SqlString.js#L54)","state":0,"publishedAt":"2025-10-29T18:30:33+00:00","modifiedAt":"2026-09-10T03:50:30.1281771+00:00","affected":[{"ecosystem":"npm","name":"typeorm","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"0.3.26"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V3","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N","score":null,"severity":null},{"system":"CVSS_V4","vector":"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","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"HIGH"}],"references":["https://nvd.nist.gov/vuln/detail/CVE-2025-60542","https://github.com/typeorm/typeorm/pull/11574","https://github.com/typeorm/typeorm/commit/d57fe3bd8578b0b8f9847647fd046bccf825a7ef","https://github.com/mysqljs/sqlstring/blob/cd528556b4b6bcf300c3db515026935dedf7cfa1/lib/SqlString.js#L54","https://github.com/sidorares/node-mysql2/blob/e359f454a76ba5dc31b91adf7bdb4099ca317bb5/lib/base/connection.js#L524","https://github.com/sidorares/node-mysql2/blob/e359f454a76ba5dc31b91adf7bdb4099ca317bb5/lib/connection_config.js#L124","https://github.com/typeorm/typeorm/blob/0.3.25/src/driver/mysql/MysqlConnectionOptions.ts","https://github.com/typeorm/typeorm/releases/tag/0.3.26","https://github.com/typeorm/typeorm/releases?q=security&expanded=true","https://medium.com/@alizada.cavad/cve-2025-60542-typeorm-mysql-sqli-0-3-25-a1b32bc60453","http://github.com/typeorm/typeorm"],"sourceUrl":"https://github.com/advisories/GHSA-q2pj-6v73-8rgj","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-q2pj-6v73-8rgj","identifiers":["GHSA-q2pj-6v73-8rgj","CVE-2025-60542"]},"retained":false,"historicalAffected":[]}],"coverage":[{"source":"cisa-kev:global","scope":"Complete CISA KEV catalog; all vendors. Missing entries do not establish absence of exploitation.","generation":"2026-11-01T06:04:52.8719841+00:00","complete":true,"records":1766,"lastAttemptAt":"2026-11-01T06:04:52.8719841+00:00","lastSuccessAt":"2026-11-01T06:04:53.0675499+00:00","error":null,"lastVerifiedAt":"2026-11-01T06:04:53.0675508+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"cve-program","scope":"Official CVE Program baseline and cumulative hourly delta; all vendors, published and rejected records","generation":"cve-aece262bb10a694367a43c24d730aa8e8dc171723eaec4c15cdd32f04bda103f-a933b1479a7552c54c341eb9ec0d1fb480f1c29440411d779fc2beac1cedc878","complete":true,"records":417615,"lastAttemptAt":"2026-11-01T06:04:51.8170333+00:00","lastSuccessAt":"2026-11-01T06:04:51.788621+00:00","error":null,"lastVerifiedAt":"2026-11-01T06:04:51.8170333+00:00","snapshotPublishedAt":"2026-11-01T05:26:35+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"euvd","scope":"Rolling EUVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global EUVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-9b59702730f84d51aaf9d09d39cca3d4","complete":false,"records":13567,"lastAttemptAt":"2026-11-01T06:17:03.2881663+00:00","lastSuccessAt":"2026-11-01T06:17:03.282+00:00","error":"79 identifier lookups failed; latest failures include HTTP 403. Other identifiers were checked independently.","lastVerifiedAt":"2026-11-01T06:17:03.282+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13558,"expectedIdentifiers":13637,"failedIdentifiers":79},{"source":"first-epss:nuget","scope":"FIRST EPSS for explicit CVE aliases in the collected public NuGet archive. Not a global EPSS backfill.","generation":"2026-11-01T06:04:52.8719841+00:00","complete":true,"records":1095,"lastAttemptAt":"2026-11-01T06:04:52.8719841+00:00","lastSuccessAt":"2026-11-01T06:04:53.0686559+00:00","error":null,"lastVerifiedAt":"2026-11-01T06:04:53.0686564+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"nvd","scope":"Rolling NVD lookups of CVE aliases in current public OSV archives; 500 identifiers per refresh, rechecked after 48 hours. Not a global NVD catalog. Successful not-found lookups count as checked; they do not imply withdrawal or safety. No reader inventory is sent.","generation":"enrichment-cb479fb73dd0432cb8c82ee43f01837b","complete":true,"records":13580,"lastAttemptAt":"2026-11-01T06:04:53.5633922+00:00","lastSuccessAt":"2026-11-01T04:04:52.54+00:00","error":null,"lastVerifiedAt":"2026-11-01T04:04:52.54+00:00","snapshotPublishedAt":null,"importing":false,"stagedRecords":0,"checkedIdentifiers":13637,"expectedIdentifiers":13637,"failedIdentifiers":0},{"source":"osv:Go","scope":"Complete OSV Go ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"go-21dcd6662970dfea02e4ea60ee637115e8d92664947484d2b9276b3f6568a84f","complete":true,"records":9815,"lastAttemptAt":"2026-11-01T06:04:52.4596842+00:00","lastSuccessAt":"2026-10-30T23:47:34.1817587+00:00","error":null,"lastVerifiedAt":"2026-11-01T06:04:52.4596842+00:00","snapshotPublishedAt":"2026-10-30T23:33:17+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:NuGet","scope":"Complete OSV NuGet ecosystem archive, including GitHub Advisory Database records; NuGet version matching only","generation":"nuget-2de9ccc5290f060c7aa63f89c25dd76f655a64ba1aba7c05c97fa3bee4f09899","complete":true,"records":1967,"lastAttemptAt":"2026-11-01T06:04:51.9742703+00:00","lastSuccessAt":"2026-10-28T20:55:34.2982937+00:00","error":null,"lastVerifiedAt":"2026-11-01T06:04:51.9742703+00:00","snapshotPublishedAt":"2026-10-28T20:03:08+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:crates.io","scope":"Complete OSV crates.io ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"crates.io-f95f76cd406ae5bae3de632ad37fd2d5160b44f5e6b51748ac6f8f0c0c88e72b","complete":true,"records":3028,"lastAttemptAt":"2026-11-01T06:04:52.8406446+00:00","lastSuccessAt":"2026-10-30T23:47:38.4914494+00:00","error":null,"lastVerifiedAt":"2026-11-01T06:04:52.8406446+00:00","snapshotPublishedAt":"2026-10-30T23:18:12+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null},{"source":"osv:npm","scope":"Complete OSV npm ecosystem archive, including withdrawn and malicious-package source records; statement counts are not unique CVE counts","generation":"npm-712291bb5a0ee4f1ca7325e317f98ff05e9ab8d14f863abf00a323d9e6d8331e","complete":true,"records":230994,"lastAttemptAt":"2026-11-01T06:04:52.3523321+00:00","lastSuccessAt":"2026-10-31T17:06:47.8999408+00:00","error":null,"lastVerifiedAt":"2026-11-01T06:04:52.3523321+00:00","snapshotPublishedAt":"2026-10-31T16:33:38+00:00","importing":false,"stagedRecords":0,"checkedIdentifiers":null,"expectedIdentifiers":null,"failedIdentifiers":null}]}