CVE-2021-41816

Source
https://nvd.nist.gov/vuln/detail/CVE-2021-41816
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-41816.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-41816
Aliases
Related
Published
2022-02-06T21:15:07Z
Modified
2024-09-18T03:16:52.522924Z
Severity
  • 9.8 (Critical) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

CGI.escapehtml in Ruby before 2.7.5 and 3.x before 3.0.3 has an integer overflow and resultant buffer overflow via a long string on platforms (such as Windows) where sizet and long have different numbers of bytes. This also affects the CGI gem before 0.3.1 for Ruby.

References

Affected packages

Alpine:v3.12 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.7.5-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.2-r0
2.7.2-r1
2.7.3-r0
2.7.4-r0

Alpine:v3.13 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.7.5-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.1-r4
2.7.1-r5
2.7.2-r0
2.7.2-r1
2.7.2-r2
2.7.2-r3
2.7.2-r4
2.7.3-r0
2.7.4-r0

Alpine:v3.14 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.7.5-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.1-r4
2.7.1-r5
2.7.2-r0
2.7.2-r1
2.7.2-r2
2.7.2-r3
2.7.2-r4
2.7.3-r0
2.7.3-r1
2.7.4-r0

Alpine:v3.15 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.1-r4
2.7.1-r5
2.7.2-r0
2.7.2-r1
2.7.2-r2
2.7.2-r3
2.7.2-r4
2.7.3-r0
2.7.3-r1
2.7.4-r0
2.7.4-r1
2.7.4-r2

3.*

3.0.2-r0

Alpine:v3.16 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.1-r4
2.7.1-r5
2.7.2-r0
2.7.2-r1
2.7.2-r2
2.7.2-r3
2.7.2-r4
2.7.3-r0
2.7.3-r1
2.7.4-r0
2.7.4-r1
2.7.4-r2

3.*

3.0.2-r0

Alpine:v3.17 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.1-r4
2.7.1-r5
2.7.2-r0
2.7.2-r1
2.7.2-r2
2.7.2-r3
2.7.2-r4
2.7.3-r0
2.7.3-r1
2.7.4-r0
2.7.4-r1
2.7.4-r2

3.*

3.0.2-r0

Alpine:v3.18 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.1-r4
2.7.1-r5
2.7.2-r0
2.7.2-r1
2.7.2-r2
2.7.2-r3
2.7.2-r4
2.7.3-r0
2.7.3-r1
2.7.4-r0
2.7.4-r1
2.7.4-r2

3.*

3.0.2-r0

Alpine:v3.19 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3-r0

Affected versions

1.*

1.8.7_p72-r1
1.8.7_p72-r2
1.8.7_p160-r2
1.8.7_p160-r3
1.8.7_p174-r0
1.8.7_p174-r1
1.8.7_p174-r2
1.8.7_p174-r3
1.8.7_p174-r4
1.8.7_p174-r6
1.8.7_p174-r7
1.8.7_p299-r0
1.8.7_p299-r1
1.8.7_p299-r2
1.8.7_p352-r0
1.8.7_p352-r1
1.8.7_p358-r1
1.9.3_p194-r0
1.9.3_p286-r0
1.9.3_p286-r1
1.9.3_p286-r2
1.9.3_p327-r0
1.9.3_p362-r0
1.9.3_p374-r0
1.9.3_p385-r0
1.9.3_p392-r0

2.*

2.0.0_p0-r0
2.0.0_p0-r1
2.0.0_p195-r0
2.0.0_p247-r0
2.0.0_p247-r1
2.0.0_p247-r2
2.0.0_p247-r3
2.0.0_p353-r0
2.0.0_p353-r1
2.0.0_p353-r2
2.0.0_p481-r0
2.1.5-r0
2.1.5-r1
2.2.1-r0
2.2.2-r0
2.2.2-r1
2.2.3-r0
2.2.3-r1
2.2.4-r0
2.3.1-r0
2.3.1-r1
2.3.1-r2
2.3.2-r0
2.3.3-r0
2.3.3-r1
2.3.3-r2
2.3.3-r3
2.4.0-r3
2.4.1-r1
2.4.1-r2
2.4.1-r3
2.4.1-r4
2.4.1-r5
2.4.2-r0
2.4.2-r1
2.4.3-r0
2.5.0-r0
2.5.0-r1
2.5.1-r0
2.5.1-r1
2.5.1-r2
2.5.2-r0
2.5.3-r0
2.5.3-r1
2.5.3-r2
2.5.5-r0
2.6.3-r0
2.6.3-r1
2.6.3-r2
2.6.4-r0
2.6.5-r0
2.6.5-r1
2.6.5-r2
2.6.6-r2
2.6.6-r3
2.6.6-r4
2.7.1-r0
2.7.1-r1
2.7.1-r2
2.7.1-r3
2.7.1-r4
2.7.1-r5
2.7.2-r0
2.7.2-r1
2.7.2-r2
2.7.2-r3
2.7.2-r4
2.7.3-r0
2.7.3-r1
2.7.4-r0
2.7.4-r1
2.7.4-r2

3.*

3.0.2-r0

Alpine:v3.20 / ruby

Package

Name
ruby
Purl
pkg:apk/alpine/ruby?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
3.0.3-r0

Debian:11 / ruby2.7

Package

Name
ruby2.7
Purl
pkg:deb/debian/ruby2.7?arch=source

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
2.7.4-1+deb11u1

Affected versions

2.*

2.7.4-1

Ecosystem specific

{
    "urgency": "not yet assigned"
}

Git / github.com/ruby/cgi

Affected ranges

Type
GIT
Repo
https://github.com/ruby/cgi
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed

Affected versions

v0.*

v0.1.0
v0.2.0
v0.3.0