From Leo XIII’s encyclical Quod Apostolici muneris, of December 28, 1878:
For, indeed, although the socialists, stealing the very Gospel itself
with a view to deceive more easily the unwary, have been accustomed to
distort it so as to suit their own purposes, nevertheless so great is
the difference between their depraved teachings and the most pure
doctrine of Christ that none greater could exist: “for what
participation hath justice with injustice? Or what fellowship hath light
with darkness?” (2 Cor. 6:14). Their habit, as we have intimated, is
always to maintain that nature has made all men equal, and that,
therefore, neither honor nor respect is due to majesty, nor obedience to
laws, unless, perhaps, to those sanctioned by their own good pleasure.
But, on the contrary, in accordance with the teachings of the Gospel,
the equality of men consist in this: that all, having inherited the same
nature, are called to the same most high dignity of the sons of God,
and that, as one and the same end is set before all, each one is to be
judged by the same law and will receive punishment or reward according
to his deserts. The inequality of rights and of power proceeds from the
very Author of nature, “from whom all paternity in heaven and earth is
named.” (Eph. 3:15). (Catholic World, Vol. 27 [March 1879], p. 853.)
Pope Leo XIII Warns against Freemasonry
On the Evils Affecting Modern Society, by Pope Leo XIII (Christian Audiobook)