gazay/gon · Security
Gon gem lack of escaping certain input when outputting as JSON
- GHSA ID
- GHSA-78vq-9j56-wrfr
- CVE ID
- CVE-2020-25739
- Severity
- medium
- Published
- Updated
- CVSS
- 6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CVSS v3
- 6.1 · CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
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.
CWEs
- CWE-79 · Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
References
- https://nvd.nist.gov/vuln/detail/CVE-2020-25739 ↗
- https://github.com/gazay/gon/commit/fe3c7b2191a992386dc9edd37de5447a4e809bc7 ↗
- https://lists.debian.org/debian-lts-announce/2020/09/msg00018.html ↗
- https://usn.ubuntu.com/4560-1/ ↗
- https://github.com/rubysec/ruby-advisory-db/blob/master/gems/gon/CVE-2020-25739.yml ↗
- https://github.com/advisories/GHSA-78vq-9j56-wrfr ↗