Hackers accessed personal information of more than 200,000 service members earlier this year and posted a sampling of the data online.
The information came from the Smart Web Move system, an online application run by the Navy and used by all branches of the military to arrange household moves.
Those affected were notified in letters this month, said Debbie Dortch, a Navy spokeswoman.
The compromised database stored 11 years of private information, but the records of just 20 people were posted on a website in June, Dortch said. The breach affected anyone who had used the system since 2001.
Compromised information includes full names, social security numbers, home addresses, personal email addresses, user names and answers to online security questions, John Goodhart, deputy head of Naval Supply Systems Command, wrote in an Aug. 29 letter to affected personnel.
The Smart Web Move site was taken permanently offline on June 25 after the Navy learned of the breach, Dortch said. The site had been previously scheduled to go offline this month in lieu of another system.
The Navy declined to detail how the site was hacked.