An issue in file() was introduced in commit 9611f31313a93aa036389c5f3b15eea53510d4d1 (Oct 2016) lets an attacker overwrite a fixed 20 bytes stack buffer with a specially crafted .notes section in an ELF binary. This was fixed in commit 35c94dc6acc418f1ad7f6241a6680e5327495793 (Aug 2017).
https://security.gentoo.org/glsa/201710-02
https://github.com/file/file/commit/9611f31313a93aa036389c5f3b15eea53510d4d
https://github.com/file/file/commit/35c94dc6acc418f1ad7f6241a6680e5327495793