Technically speaking, Vatican City and San Marino are not the only countries that exist within Italy. In fact, there is also the Order of Malta, a Roman Catholic lay religious order that functions as a sovereign entity of international law, albeit without a physical territory.
Established as an offshoot of the medieval Knights Hospitaller, the Order of Malta was, as its name suggests, originally based on the island of Malta, which was given to them in 1530 by Charles V, Holy Roman Emperor. The island was invaded by Napoleon in 1798, then taken over by the British Empire in 1814, leaving the Order of Malta without any territory.
The order was disbanded but restored in 1834 under the new name Sovereign Military Hospitaller Order of St. John of Jerusalem, of Rhodes and of Malta. Its new headquarters was placed in Palazzo Malta in Rome, a 16th-century building owned by the order since 1630, and it was granted extraterritoriality in 1869 alongside its other headquarters, Villa Malta.
Today, the Sovereign Military Order of Malta (SMOM) is recognized by over 100 countries as an independent sovereign entity, maintaining diplomatic relations with them. It has its own passport, coins, and stamps, and Palazzo Malta’s extraterritoriality continues to this day, functioning as the de-facto capital of the Order of Malta.