Am I affected?

type your stdlib version to check

Description

Improper Validation of Specified Quantity in Input vulnerability in Erlang/OTP stdlib allows a remote attacker to degrade availability by supplying a URI whose port component is a very long run of digits.

uri_string:get_port/1 passes the port substring to binary_to_integer/1 with no length bound, catching only error:badarg, so a syntactically valid port of up to roughly 1.26 million digits converts successfully and costs the calling process hundreds of milliseconds of arbitrary-precision arithmetic. The conversion is reached from every authority-parsing path in uri_string:parse/1, including the host, registered-name, and IPv4 and IPv6 forms. parse/1 is the documented interface for parsing URIs, so any application that parses an attacker-supplied URI is exposed without further configuration. The conversion function is documented to accept integers of any size, so bounding the input is the caller's responsibility.

This issue affects OTP from OTP 21.0 before OTP 27.3.4.17, OTP 28.5.0.6, and OTP 29.0.6, corresponding to stdlib from 3.5 before 6.2.2.5, 7.3.0.2, and 8.0.4.

Weaknesses & attack patterns

Weakness

CWE-1284 · Improper Validation of Specified Quantity in Input in catalog → MITRE ↗

Attack patterns

CAPEC-231 · Oversized Serialized Data Payloads MITRE ↗

Affected — Erlang / stdlib Repository ↗

≥ 3.5 and up affected
→ 6.2.2.5 not affected
→ 7.3.0.2 not affected
→ 8.0.4 not affected
every other version: unaffected
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type otp
modules · source files · routines
modules uri_string
source files src/uri_string.erl
routines uri_string:get_port/1 · uri_string:parse/1

Affected — Erlang

≥ 21.0 and up affected
→ 27.3.4.17 not affected
→ 28.5.0.6 not affected
→ 29.0.6 not affected
every other version: unaffected
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type otp
modules · source files · routines
modules uri_string
source files lib/stdlib/src/uri_string.erl
routines uri_string:get_port/1 · uri_string:parse/1

Affected — GitHub / erlang/otp Repository ↗

≥ 29a9dd0 and up affected
→ aba0fe8 not affected
→ e3be1cf not affected
every other version: unaffected
cpe cpe:2.3:a:erlang:erlang/otp:*:*:*:*:*:*:*:*
version type git
modules · source files · routines
modules uri_string
source files lib/stdlib/src/uri_string.erl
routines uri_string:get_port/1 · uri_string:parse/1

References

Credits

Eric Meadows-Jönsson Finder
Jonatan Männchen / EEF Finder
José Valim Finder
Peter Ullrich Finder
Dan Gudmundsson Analyst
Ingela Anderton Andin Analyst
John Högberg Analyst
Rickard Green Analyst
Konrad Pietrzak / Ericsson Remediation developer

CVSS breakdown

CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Exploitability

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None

Vulnerable System

Confidentiality
None
Integrity
None
Availability
Low

Subsequent Systems

Confidentiality
None
Integrity
None
Availability
None
« All CVEs