A paroxysmal pain under the right rib cage for a few seconds may be caused by intercostal neuralgia, cholecystitis, gastroenteritis and other diseases. 1. Intercostal neuralgia: A tingling sensation coming from under the ribs on the right side may be intercostal neuralgia due to nerve changes. The pain is a stabbing pain and is short, only for a few seconds. 2. cholecystitis: if stones in the gallbladder remain in the wall of the gallbladder for a long time, chronic cholecystitis, or even acute infectious cholecystitis, these inflammatory factors can irritate the gallbladder nerves, which can result in a paroxysm of pain under the right side of the ribs. 3. Gastroenteritis: acute inflammatory stimulation can lead to spasm of the gastrointestinal tract. Gastroenteritis is mainly caused by bacterial and viral infections, and when the infectious agent stimulates the gastrointestinal tract, it causes acute inflammation. At this time, the smooth muscles of the gastrointestinal tract will spasm, causing a bout of contraction, resulting in a paroxysm of pain. If the symptom of a paroxysmal pain under the right rib cage for a few seconds persists without relief, you need to seek medical treatment promptly.