Updated

Some of the nation’s top intelligence minds were fired from the CIA — for hacking a vending machine.

The spy group axed several contractors after it discovered they had stolen $3,314.40 in eats from compromised vending machines between fall 2012 and March 2013, according to a report obtained by BuzzFeed News.

When nosh began going missing from agency vending machines, the CIA did what it does best — it put up cameras and started spying on the break room, according to the report.

“Video footage recovered from the surveillance cameras captured numerous perpetrators engaged in the … theft scheme, all of whom were readily identifiable as agency contract personnel,” the report states.

The machines take payment via prepaid cards, but one contract worker realized he could use a dummy card with no money on it if he simply unplugged the so-called “FreedomPay” system so it could not connect to payment servers, the report states.

Click for more from The New York Post