From an answer by Slytherincess to Why could Madeye Moody/Barty Crouch see through the Invisibility Cloak using his Magical Eye?
We know for certain that at least one spell works against the Invisibility Cloak: Homenum Revelio. In Chamber of Secrets, Dumbledore uses Homenum Revelio to see Harry and Ron under the Invisibility Cloak in Hagrid's hut:
‘However,’ said Dumbledore, speaking very slowly and clearly, so that none of them could miss a word, ‘you will find that I will only truly have left this school when none here are loyal to me. You will also find that help will always be given at Hogwarts to those who ask for it.’
For a second, Harry was almost sure Dumbledore’s eyes flickered towards the corner where he and Ron stood hidden.
Chamber of Secrets - page 195 - UK Hardcover - chapter 14, Cornelius Fudge
J.K. Rowling confirms this in an interview:
Angela Morrissey: Why is it that albus dumbledore can see harry under his invisibility cloak at certain moments? (during the series is the cloak only infallible to those who do not own a deathly hallow).
J.K. Rowling: Dumbledore, who could perform magic without needing to say the incantation aloud, was using ‘homenum revelio’ - the human-presence-revealing spell Hermione makes use of in Deathly Hallows.