Actually, test to see if it's actual flexibility (which it might be) or stability issues.
Lay on your back and bring your knees up to your chest (don't use your arms to pull them). Flex your toes towards your head.
Think about this angle and how it would be while squatting. If it's lower than you are squatting, then you have the flexibility, you lack 'stability'. If you can't get those knees very high, the yep, flexibility is your issue.
There are some good articles on squatting flexibility vs. stability on this site.
Also, as people said, definitely warm up. Warm up with whatever you normally use, plus some hip flexor dynamic stretching, as well as some bodyweight and low weight squats.
Focus on getting the TOP of your thigh to at least parallel (lower is better), then you can work on other form points and more weight.