Depends who you ask. The Gemara, Sanhedrin 12a, says:
אין מעברין את השנה לא משנה לחברתה ולא שלש שנים זו אחר זו אמר רבי שמעון מעשה ברבי עקיבא שהיה חבוש בבית האסורים ועיבר שלש שנים זו אחר זו אמרו לו משם ראיה ב"ד ישבו וקבעו אחת אחת בזמנה
The court may not intercalate the year from one year to another, and it does not intercalate three successive years, one directly after the other. Rabbi Shimon says: There was an incident involving Rabbi Akiva at the time when he was incarcerated in prison, and he intercalated three years, one after the other. The Sages said to Rabbi Shimon: Is there any proof from there? Rabbi Akiva merely made the calculations, but a special court sat and established each one at its time.
Rashi there (first explanation) says that the question is actually about whether you can have three consecutive leap years, with the Tanna Kamma saying no and R' Shimon saying yes. According to that explanation, the maximum would be 3 according to R' Shimon and 2 according to the Chachomim.
But Tosafos there finds that explanation difficult, since two consecutive leap years would also put the Yomim Tovim out of season, and so they prefer Rashi's second explanation, that the question is how many future leap years they can plan ahead for at one time. In that case, it sounds like there could never be even 2 in succession.
Rabbeinu Chananel there seems to understand somewhere in between: everyone agrees you can have 3 consecutive leap years, and the argument is just whether those can be predetermined or whether they have to declare each one in its time. He gives a scenario in which you could have three consecutive leap years: suppose that in the 14th year of the machzor (which is supposed to be a leap year) there was a famine, the 15th was Shmita, and the 16th is the year after Shmita (and the Gemara there earlier says that you're not supposed to declare a leap year in such cases). Since there still need to be 7 leap years in every 19, that means they'd need to make years 17-18-19 all leap.