The hesiod_init function in lib/hesiod.c in Hesiod 3.2.1 compares EUID with UID to determine whether to use configurations from environment variables, which allows local users to gain privileges via the (1) HESIOD_CONFIG or (2) HES_DOMAIN environment variable and leveraging certain SUID/SGUID binary.
https://security.gentoo.org/glsa/201805-01
https://github.com/achernya/hesiod/pull/9
https://bugzilla.redhat.com/show_bug.cgi?id=1332508