Cavities in carbonate rock, such as vugs or karsts, cause scattering attenuation in passing waves. The degree of such attenuation is often difficult to quantify because the exact scale and structure of the cavities is unknown. Taking the exact vug structure from X-ray computerized-tomography scans of two carbonate cores, we use 3D finite-difference modeling to determine the P-wave scattering attenuation in these cores at ultrasonic frequencies. The predicted scattering attenuation is quite high, with Q of 15 and 8 near the source frequency of 250 kHz. In spite of the sharp contrast in medium properties between cavity and rock, and the violation of the small perturbation assumption, the computed scattering attenuation is roughly comparable to that predicted by various random medium scattering theories. This suggests that if the volume fraction and typical size of vugs or karsts can be estimated, then a rough estimate of frequency-dependent scattering attenuation can be made.