6.1medium
Gon gem lack of escaping certain input when outputting as JSON
- Severity
- 6.1medium CVSS:3.1 by NVD
- Exploit likelihood
- 1.38% (higher than 72% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-78vq-9j56-wrfr
Description
An issue was discovered in the gon gem before gon-6.4.0 for Ruby. MultiJson does not honor the escape_mode parameter to escape fields as an XSS protection mechanism. To mitigate, json_dumper.rb in gon now does escaping for XSS by default without relying on MultiJson.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| gon (RubyGems) | before 6.4.0 | GitHub Advisory Database |
| gon_project gon | before 6.4.0 | NVD |
| canonical ubuntu_linux | 18.04 | NVD |
| debian debian_linux | 9.0 | NVD |
All scores
| GitHub | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 6.1medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N |
| NVD | 4.3medium CVSS:2.0 | AV:N/AC:M/Au:N/C:N/I:P/A:N |
Classification
What each source says
CVE List
An issue was discovered in the gon gem before gon-6.4.0 for Ruby. MultiJson does not honor the escape_mode parameter to escape fields as an XSS protection mechanism. To mitigate, json_dumper.rb in gon now does escaping for XSS by default without relying on MultiJson.
NVD (es)
Se detectó un problema en la gema gon versiones anteriores a gon-6.4.0 para Ruby. MultiJson, no respeta el parámetro escape_mode para escapar de los campos como mecanismo de protección XSS. Para mitigar, el archivo json_dumper.rb en gon ahora escapa para un ataque de tipo XSS por defecto sin depender de MultiJson
References
| https://github.com/gazay/gon/commit/fe3c7b2191a992386dc9edd37de5447a4e809bc7 | patch, third-party-advisory, web | |
| https://lists.debian.org/debian-lts-announce/2020/09/msg00018.html | mailing-list, third-party-advisory, web | |
| https://usn.ubuntu.com/4560-1/ | third-party-advisory, vendor-advisory | |
| https://nvd.nist.gov/vuln/detail/CVE-2020-25739 | advisory | |
| https://github.com/gazay/gon | package | |
| https://github.com/rubysec/ruby-advisory-db/blob/master/gems/gon/CVE-2020-25739.yml | web | |
| https://usn.ubuntu.com/4560-1 | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2020-25739 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-78vq-9j56-wrfr changed 2024-02-19 | CC-BY-4.0 |
| NVD | CVE-2020-25739 changed 2026-06-17 | Public domain |