Fishermen found the wooden boat with 22 survivors off Cilacap in Central Java province late Monday and notified police, district police spokesman Siti Khayati told reporters.
"Two of them died and one went missing after jumping into the sea," she said, adding that two others were dehydrated.
Among the survivors are a four-year-old boy and a 10-year-old girl, who are being held on the island of Nusa Kambangan near, the coastal town of Cilacap.
News that makes sense
Your trusted source for staying up-to-date with the world around you. Get free daily news updates and analysis, straight to your inbox.
District immigration chief Syamsul Bahri said the migrants carried no documents and would be referred to the International Organisation for Migration.
Migrants told reporters they fled their country on November 22 and wanted to seek asylum in Australia.
"No water, no food, 15 day. I drink from rain," said 27-year-old Nilakhsan in halting English at the immigration centre in Cilacap, adding they were adrift for a month in total.
Australia is facing a steady influx of asylum-seekers arriving by boat. Many use Indonesia as a transit hub, paying people-smugglers for passage on wooden vessels.
Scores of them, many from Afghanistan, have drowned while attempting the journey.
The United Nations refugee agency in Jakarta said that as July last year there were 1,225 refugees and 5,429 asylum-seekers registered in Indonesia.
Nearly 60 percent come from Afghanistan and many of the rest from Iran and Pakistan. Growth rates have leapt in recent years.
.

