SQL Injection Affecting geocoder package, versions <1.6.1


Severity

Recommended
0.0
high
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.3% (53rd percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about SQL Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-RUBY-GEOCODER-543302
  • published26 Jan 2020
  • disclosed22 Jan 2020
  • creditUnknown

Introduced: 22 Jan 2020

CVE-2020-7981  (opens in a new tab)
CWE-89  (opens in a new tab)

How to fix?

Upgrade geocoder to version 1.6.1 or higher.

Overview

geocoder is a package that provides object geocoding (by street or IP address), reverse geocoding (coordinates to street address), distance queries for ActiveRecord and Mongoid, result caching, and more.

Affected versions of this package are vulnerable to SQL Injection. sql.rb in Geocoder allows a Boolean-based SQL injection when within_bounding_box is used in conjunction with untrusted sw_lat, sw_lng, ne_lat, or ne_lng data.

References

CVSS Base Scores

version 3.1