Overuse or injury, poor posture, osteoarthritis or pressure on the spinal nerves due to herniated discs may cause pain in the middle back under the ribs, according to WebMD. A fracture of one of the vertebrae that make up the spinal column can also be to blame.
Although not common, infection, cancer or gallbladder disease can also cause pain in this region, notes WebMD. Upper and middle back pain can be felt anywhere from the bottom of the rib cage to the base of the neck. Evaluation by a medical professional is the only definitive way to diagnose back pain causes.
To determine the origin of back pain and devise an effective treatment plan, a doctor takes a complete medical history, performs a physical exam and orders imaging studies, advises WebMD. Imaging studies may include simple X-rays or magnetic resonance imaging, or MRI, studies.
Once a cause is determined, treatment may involve the use of over-the-counter or prescription pain medications, such as anti-inflammatory drugs or acetaminophen, to control symptoms, according to WebMD. In addition, doctors sometimes recommend the application of ice or heat packs and therapies such as spinal manipulation or massage. Surgery is an uncommon treatment for pain in this area.