Low- and middle- income families in Massachusetts are in rough shape when it comes to managing their money and saving for a rainy day, according to a new annual survey of financial security indicators in the 50 states and the District of Columbia.

The survey, produced by the Corporation for Enterprise Development, a nonprofit advocacy group based in Washington, DC, paints a bleak picture. About 40 percent of Massachusetts households are “liquid-asset poor,” meaning they have less than three months savings to fall back on in case of a job loss or a major medical emergency. Nearly 20 percent of households earning between $67,789 and $109,032 also have meager short-term savings, less than $6,000 for a family of four.

Elsewhere in New England, Maine families fare the worst: 46 percent of households do not have enough savings. Households in Rhode Island and New Hampshire are a bit more secure: only 27 percent of families in the Ocean State lack emergency savings, putting the state third in the nation behind Minnesota and Iowa. In the Granite State, the figure is 31 percent. Connecticut has a profile is similar to Massachusetts: 36.6 percent of households do not have enough liquid assets in case of trouble. Families in Alabama can expect the toughest time in the country when disaster strikes, nearly 63 percent of households have no financial resources.

Despite owning major assets like homes or cars, 27 percent of Massachusetts households are also “asset poor” and are burdened by the debt on the big ticket items.

Credit problems complicate financial security as well. Nearly 50 percent of Bay State consumers have subprime credit. Average credit card debt is high at $12,563, putting the state near the bottom of the group’s state rankings.

Not surprisingly, the state’s high housing costs contribute to financial insecurity in Massachusetts. The state earned a grade of “F” in housing and homeownership. The Bay State is 48th in home affordability and 41st in delinquent mortgage loans. Connecticut, New Jersey, New York, and Rhode Island also received “Fs” in that category.

Margaret Miley, executive director of the Midas Collaborative, a statewide network of community groups that provides and advocates for financial education for low- and moderate- income residents, said that liquid-asset poverty and bad credit are troubling indicators, especially since the Bay State earned “As” in other areas on the scorecard, such as education and health care.

Miley said that mandatory K-12 financial education instruction would help students become better money managers and consumers. “Kids are extremely unprepared to manage finances,” she said. “People should leave high school with an understanding of how to navigate the economy.”

She acknowledged that spending habits and family attitudes toward money also play roles in how people deal with finances. “People can learn a lot of things and but still not implement them,” Miley said. “You can learn that smoking is bad, but it doesn’t mean that you’re not smoking.”