Reducing the computational workload by simplifying the analysis of karst foundations into a plane strain problem can yield significant advantages. Yet, such an approach fails in reproducing the engineering situation in a rigorous manner. In this regard, this paper proposes an upper-bound method that can effectively analyze the bearing capacity of three-dimensional karst foundations. This method is utilized to investigate the impact of various pile diameters, the ratio of roof thickness to pile diameter, and the ratio of cave width to pile diameter on the stability of karst foundations. The validity of this method is established through an illustrative example. The outcomes illustrate that when subjected to both tensile and compressive horizontal stresses if the maximum horizontal stress surpasses the tensile strength of the rock mass, the roof rock mass may suffer damage. Increasing the ratio of roof thickness to pile diameter can bring down the horizontal stress value. The stability factor is largely influenced by the ratio of roof thickness to pile diameter. The most prominent growth trend of the stability factor is observed when the ratio is less than 3. If the ratio of the roof thickness to pile diameter exceeds 3, the prediction of the bearing capacity estimation for the karst foundation in three-dimensional circumstances is more conservative than that in two-dimensional circumstances.