Facebook (FB) CEO Mark Zuckerberg famously only takes a $1 annual salary, but the cost of ferrying and protecting him has cost Facebook $20 million over the past three years, according to a new public filing. 

The company said that the cost of Zuckerberg's security was a way to address "threats to his safety arising directly as a result of his position as our founder, chairman and CEO" of Facebook, a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio.

The expenses include fees, fuel, crew and catering costs for his private flights as well as security personnel and systems at his residences. 

While paying for the security of high-profile executives isn't uncommon, the $9 million Facebook spent on Zuckerberg's security last year dwarfs the $317,000 Apple (AAPL) says it spent on CEO Tim Cook's security and travel last year. 

Facebook also covers security expenses for COO Sheryl Sandberg. The company shelled out $2.7 million for travel and security for Sandberg last year. 

Facebook spent $5.8 million on Zuckerberg's security in 2016 before raising that amount to nearly $9 million last year. 

More from Technology

Facebook Exposed Millions of Users' Unshared Photos to Developers

Facebook Exposed Millions of Users' Unshared Photos to Developers

Amazon vs. Apple: A Tale of Two Corporate Expansions

Amazon vs. Apple: A Tale of Two Corporate Expansions

Netflix's Key Challenges Could Intensify in 2019

Netflix's Key Challenges Could Intensify in 2019

Smaller Cap Stocks Could Make Great Stocking Stuffers Ahead of 2019

Smaller Cap Stocks Could Make Great Stocking Stuffers Ahead of 2019

Flashback Friday: Johnson & Johnson Hits Take Historic Plunge

Flashback Friday: Johnson & Johnson Hits Take Historic Plunge