Identical to May, the CPI for all items rose 1.7 percent before seasonal adjustment in June. The index for all items minus food and energy, called core prices, rose 0.2 percent.
Over a 12-month period core prices, which are monitored intently by the U.S. Federal Reserve, rose 2.2 percent, slightly above the central bank's target of 2 percent or lower and a slight drop from May, when the 12-month figure was 2.3 percent.
The energy index for the past 12 months ending in June shows a 3.9 percent decline, although energy prices were mixed month-to-month with prices for gasoline down for the third consecutive month and prices for energy services flat.
Food prices rose 0.2 percent month-to-month and posted a 2.7 percent increase from June 2011.
But prices in the more volatile categories of food and energy could turn around soon, warned Chris Williamson, chief economist at international research firm Markit.
"Recent increases in food and oil prices could mean that inflation could rise again," Williamson said in a statement. "Hot and dry weather has raised concerns about crop yields, pushing soybean prices up 17 percent in the last month, while prices for corn and wheat have jumped 44 percent and 45 percent, respectively," he said.
Prices for new and used vehicles indicate consumers are holding onto older cars and buying fewer new ones. For new vehicles, prices rose 0.9 percent over the past 12 months, while prices for used cars and trucks rose 2.3 percent.