A student at James Madison High School in Fairfax County has contracted spinal meningitis and another student, who sang in the same school choir, is ill with what is believed to be the identical disease. Fairfax County health officials reported.

Spinal meningitis is a bacterial infection that attacks the body's spinal fluid and, if unreated, can cause brain damage.

Dr. John Einarson, head of the county's communicable disease control, said it was unusual that two cases of this type of meningitis, occurred in such close proximity. It is a very "sporadic" strain of bacteria and two cases are rarely found even in the same family, he said.

Nevertheless, as a precautionary measure, letters have been sent out to approximately 500 families whose children attend the school in Vienna where the two ill teen-agers are students, and the principal, George W. Felton.

The letters, sent to parents of students who shared classes with the stricken students, advise parents to watch for the preliminary symptoms of the disease, which include a high fever and severe weakness. Later symptoms include muscular aches in the legs, a rash and finally, stiffness and pain the neck.

Felton said he had considered sending letters to parents of all students at James Madison but thought that this might cause panic. "This comes on top of rubeola," he said referring to the recent outbreak of measles in the area.

Elnarson said both students, a 15-year-old girl and a 16-year-old youth, who are both hospitalized, are "getting better."

The Fairfax health official said that spinal meningitis is "one of the most severe of all bacterial infections because it is one of the most life-threatening." But he said that most patients, who are treated with large doses of penicillin, recover with no lasting effects. Although the infection can cause brain damage, this is "not usual" Elnarson said.

There are usually three or four reported cases of this particular strain of meningitis each year in Fairfax County and these are the first two reported in 1977, Elnarson said.

State health officials report one other case, in Virginia Beach, so far this year.

There are several kinds of meningitis, caused by viruses, fungi or bacteria. It is the bacterially caused meningitis, of which the meningococcal strain is one, that are commonly called spinal meningitis and that are the most dangerous kind, said Dr. Grayson B. Miller, the state's epidemiological official.

In all, there have been 28 cases of bacterially cause meningitis in Virginia so far this year. This is the usual number, Miller said.