Please report vulnerabilities privately through GitHub security advisories, not in a public issue.
hostlist_expression is a pure library without runtime dependencies. It expands a string in memory and returns an Array. It reads and writes no files, opens no network connections and runs no commands.
Invalid ranges and separators raise a RuntimeError. There is no limit on the size of the result: a range like [1-99999999], or several ranges in one expression, expand to a very large Array. If expressions come from untrusted input, limit their length and the size of their ranges before you expand them.