A virus can attack a muscle on its own or discharge substances that injure muscle fibers. A viral infection of the muscle is called viral myositis. The types of viruses that can potentially attack muscles include HIV, the common cold and flu viruses, explains WebMD.
A bad cold, flu or pneumonia can cause muscle pain due to coughing, which is often mistaken as an attack on the muscle itself. However, in rare cases, a serious viral infection can spread from the respiratory or digestive tract to other parts of the body, including the muscles. These infections can affect single muscle groups, such as the back or shoulders, or the entire skeletal muscle system as a whole. Pain, inflammation and weakness are the most common symptoms, and they can occur quickly, making it difficult to get out of bed, according to WebMD.
Treatment of viral myositis includes antiviral drugs, hydration, bed rest and steroids to decrease inflammation. Although viral myositis can be caused by influenza and other common infectious viral diseases, the main cause is human immunodeficiency virus, notes Nancy F. Crum-Cianflone in an article in Clinical Microbiology Reviews.
If unexpected muscle pain or prolonged muscle pain in association with a cold, flu or other viral infection is experienced, a physician may run a series of tests such as blood tests, a muscle biopsy, EMG or MRI, states WebMD.