The 22-year-old, who counts Carlisle and Watford among his former clubs, was released by the U's earlier this month and recently began training with Leam Richardson's squad
"I think this has been in the pipeline for the last couple of weeks so it's been good to get it all finalised and done," Aldred said in a Stanley club statement.
"I'm just looking to hit the ground running, get myself up and running and get into the team. Hopefully I can establish myself and make a name for myself here."
Commenting on his latest signing, Richardson said: "I know quite a lot about Tom. He's a good defender and potentially he could be very, very good. I've been very pleased with how he's come in and applied himself and I think he has some great attributes which I think we lack.
"He's very powerful and he likes defending so he adds to what we have in the defensive area."
Earlier on a busy transfer deadline day, Accrington brought in goalkeeper Paul Rachubka and defender Mark Hughes on loan from Leeds and Bury respectively while extending Nicky Hunt's stay from Rotherham.