Cook, 23, who has made nine Addicks appearances this season, began his career with Sunderland and spent loan spells with Darlington, Walsall and Carlisle before signing for the Black Cats back in July.
"Our scouting system identified him (Cook) as a player," Yeovil boss Gary Johnson said.
"We were going to take him on loan with a view (to sign permanently) but obviously Charlton took him.
"It's nice for us to have him now, it's certainly cheaper. It's doing the lad a favour, Charlton a favour and hopefully us a favour."
Cook was Charlton's first summer signing last year on a free transfer following his release from hometown club Sunderland, but has failed to appear in the Addicks first team since January.
- Sports & Recreation