CVE-2016-1000225
SQL Injection via GeoJSON
Severity by source
Trivy's own label is CRITICAL. Rated critical by GHSA, Node.js Security WG.
Description
SequelizeJS 3.23.4 is vulnerable to SQL injection via GeoJSON documents containing a value with a single quote. This vulnerability affects postresql/postgis as well as MySQL. This vulnerability only exists within GeoJSON documents using the function `ST_GeomFromGeoJSON` for postgresql/postgis and the function `GeomFromText` for mysql. SequelizeJS's `geometry` datatype is vulnerable. If you have SequelizeJS models with a field that has a datatype of 'Geometry' and run a mysql or postgresql/postgis backend, your application is vulnerable SequelizeJS is a popular ORM (Object Relational Mapper) for node. GeoJSON is a format for encoding a variety of geographic data structures.
Affected packages and fixed versions
| Source | Package | Fixed in |
|---|---|---|
| npm::GitHub Security Advisory npm | sequelize | 3.23.6 |
| npm::Node.js Ecosystem Security Working Group | sequelize | >=3.23.6 |
References
- http://docs.sequelizejs.com/en/latest/api/datatypes/#geometry
- http://geojson.org/
- https://github.com/sequelize/sequelize
- https://github.com/sequelize/sequelize/commit/14e3deaf3ad27f12900e5275db1d448844c9de3e
- https://github.com/sequelize/sequelize/commit/18ac91040d9c57351d26ba998f460e214255b704
- https://github.com/sequelize/sequelize/commit/562d52585902090f4e53eb21c61314098c29d795
- https://github.com/sequelize/sequelize/commit/f93af43a1d86400487f5e3d9762f1a4b7cf6b1e1
- https://github.com/sequelize/sequelize/issues/6194