Health officials said the newborns could have been exposed when a person with active tuberculosis visited the neonatal intensive care units of the two hospitals.
The person, whose name has not been made public, visited the neonatal intensive care unit at Sacramento's Sutter Memorial Hospital between the middle and end of March, health officials determined.
The Sacramento County public health department determined 11 babies from that hospital are at risk, a spokesperson for the health department told ABC News.
The same individual visited the neonatal intensive care unit of NorthBay Medical Center in Fairfield between the end of March and mid-April where 15 babies may have been put at risk, officials said.
The Solano public health department confirmed the families of 14 of the babies have been contacted for further tests. The two hospitals said some have already undergone testing. They would not release more information about the families who were contacted.
"We will take the necessary measures to ensure that all those with significant levels of exposure are tested and, if necessary, treated with antibiotics," said Dr. Michael Stacey, chief medical officer of the Solano County Public Health Department.
Tuberculosis is a potentially dangerous infectious disease spread by microscopic germ droplets travelling through the air. Coughing, sneezing, talking in the vicinity of others, or singing to a baby can be enough to spread the germs. The disease causes bacteria slowly to grow in the lungs.
Infants and children are among the most vulnerable groups if they contract tuberculosis.
"It's extremely rare that there will be transmission to the babies who are in a neonatal intensive care unit," said Dr. Jeffrey Starke, director of the children's tuberculosis clinic at Texas Children's Hospital, who has investigated more than 30 hospital exposures of tuberculosis.
Neonatal units are designed to be more sterile environments with more air circulation, said Starke. Many babies are intubated -- given breathing tubes -- which also gives them an added layer of protection, he said.
Since it is harder to detect the bacterial infection in babies, public health officials, during investigations of hospital tuberculosis exposures, will test hospital administrators and staff who may have been exposed to see whether the babies may be at risk.
"The hospital staff is indicators of whether there's a problem of infection spread," said Starke. "If anybody got infected during that time, then their blood test or TB test now should be active."
Both hospitals are compiling a list of employees and contacting those who may have been in the area at the time of exposure, said Stacey.
More than 11,000 cases of tuberculosis were reported in the U.S. in 2010, according to the U.S. Centers for Disease Control and Prevention.
The individual who caused the exposure has been identified and is currently isolated and in treatment, said Stacey. Officials would not provide more information about the person, including the gender.
"The person did not know that they had active TB at the time, nor did the hospitals know," said Stacey.
Tuberculosis is highly treatable if caught early in infants and children. Test results of the individual's tuberculosis showed that the strain is not resistant to any of the medications available to treat the infection, said Stacey.
Exposure doesn't necessarily mean the babies, or even children or adults in the area will contract the illness.