Drilling in carbonate formations often poses a real challenge to operators, contractors and service companies. Severe fluid losses, gas kicks and other unwanted situations increase drilling risks. These risks are closely related to drilling through karsts — vugs, cavities and fractures. Therefore it is important to detect karsts early enough to avoid drilling into them or, once drilling in a karstification region is detected, to prepare risk mitigating actions. Some geophysical methods can be used for karsts detection, however, they have limitations and cannot guarantee early detection of karsts. One of the recent studies has shown that certain patterns in real-time drilling data can serve as indicators of zones with a higher likelihood of encountering karsts. In this paper, we demonstrate how these patterns can be detected in an automated manner with an adaptive differential filter algorithm. The method has been validated on real drilling data.