Facebook has lost its bid to throw out a tax bill on $7bn worth of income it had stashed overseas.

A Northern District of California judge ruled in favor of the IRS this week, finding the Social Network did not have standing to challenge the tax bod's finding that Facebook underreported its revenues via its Ireland-based subsidiary.

The IRS found that, from the 2008 through 2010 tax years, Facebook failed to report (and pay taxes on) about $7bn of income. Facebook challenged that ruling, asking that the case be taken in front of the IRS Appeals board - an independent group that sorts out tax disputes.

The US tax body moved to have the case thrown out, saying there was nothing on the books that oblige it to give Facebook an appeals hearing, certainly not with IRS Appeals.

Europe plans special tax for Google, Apple, Facebook, Amazon READ MORE

On Monday, Judge Laurel Beeler granted the government's motion, deciding that Facebook does not have standing to force the matter before IRS Appeals.

In doing so, Beeler denied Facebook's argument that, under the 2013 Administrative Procedures Act (APA), it had a right to get the case heard by the appeals board. Rather, Beeler says, the IRS gets to decide what does and doesn't get an appeal hearing.

"Facebook does not have an enforceable right to take its tax case to IRS Appeals or to compel the IRS to do so," Beeler said in the ruling [PDF].

"Facebook therefore lacks Article III standing, because the deprivation of a nonexistent right to access IRS Appeals does not constitute injury in fact. Additionally, the IRS’s decision not to refer Facebook’s tax case to IRS Appeals is not reviewable under the APA."

This does not necessarily mean Facebook will ultimately be stuck with the tax bill, however. Beeler noted that nothing in the ruling would preclude Zuck and Co. from striking a deal with IRS to settle the case, only that they can't force the matter to go to IRS Appeals.

A tax bill for $7bn in unreported income would also not be a crippling blow to a company that probably managed to haul in six figures over the time it took you to read this article.

It does, however, mean that one of the primary ways to settle the case- via IRS Appeals - won't be on the table.

It also continues a roll of bad breaks for the social network, who continues to deal with the fallout from a series of privacy disasters thanks in large part to research firm Cambridge Analytica. ®