Memory safety bugs were reported in Firefox 51. Some of these bugs showed evidence of memory corruption and we presume that with enough effort that some of these could be exploited to run arbitrary code. This vulnerability affects Firefox < 52 and Thunderbird < 52.
https://www.mozilla.org/security/advisories/mfsa2017-09/
https://www.mozilla.org/security/advisories/mfsa2017-05/