Kearns missed the beginning of the campaign due to injury and the switch to the Minstermen, who returned to the Football League this season, will provide the former Dundalk player with a chance of regular first-team football.
"Daniel obviously wants to play games and this is a good opportunity for him to go there and play for four weeks," said Posh boss Darren Ferguson.
"They have a lot of fixtures in a short space of time and it will be good for him to get some minutes under his belt in a competitive format."
Kearns, 21, added: "It has been a frustrating time for me recently. I was injured half-way through pre-season and it came at the worst possible time for me, but hopefully now I can get out and play some games for York and help them move up the table.
"It is a great opportunity for me. I watched them on Tuesday night against Fleetwood and I liked what I saw. They play some decent stuff and it will be good for me to try and show what I can do. I played in a friendly for York on Wednesday and I enjoyed it."