Don't wait for work, find it
First, okay so you're not getting assigned tasks. This happens new devs are usually put on really easy stuff or expected to shadow other devs to learn the system before they start getting real work to do. Three months is edging on the "too long" range, but not unheard of.
Still, with that if you're feeling under utilized go find work. Ask for tasks to do, if the won't assign anything to you, ask others in your team if there is something you can do to assist them, or if they still don't give you work ask informally what they'd work on if they had the time and go from there.
If you STILL can't get cooperation just do the work most devs are terrible at. Document stuff, write unit and integration tests, start reviewing code for "smelly code" or places that could perhaps be done better. Make whatever changes make sense then bring whomever is appropriate over and say "hey I saw an issue where this spot of code might Whatever wasn't good about that code so updated it to fix that, does this change make sense to you?" if they agree you can get it checked in, if not have them explain why and proceed accordingly.
Lets say you look around and you see this simply is not someone you want to work for. For whatever reason it's just not a good fit and aside of sweeping culture changes you won't be happy here. (I don't think we're there, but I'm also on the outside of the issue)
Career missteps happen, they suck, but they're nothing new. Sometimes critical details are either not covered, or misrepresented during the interview and what sounds like an excellent job winds up being a nightmare.
As far as the CV goes I'd personally omit the job in question, when asked about the gap I'd explain I worked briefly for company X but it was clear right away the role wasn't a good fit. The interviewer will likely ask you to explain why it wasn't a good fit. When you explain why as well as what measures you're taking to prevent it happening again.
Most interviewers will have no problem disregarding a single misstep it happens to the best of us. If you have more than one then it's a bit less forgiving especially if we're talking a short time span. If you have three or more missteps you need to stop and change tactics in how you find work, because whatever you're doing it's not working.
Flipping a job isn't an exact science, but generally speaking if you don't put in at least two years at a job a fair number of people will see that is a flipped job. (Culture and field play heavily on what's considered a reasonable rate of changing jobs, the provided time is for Software developers in the US)
Flipping one job in a short window isn't that big a deal. Like I mentioned above you can explain it was a poor fit, and a one time offense is no problem so long as you've given me reasonably assurance you won't cut and run on me.
Now when you flip more than one job is where things start to get dicy. If you have really good reasons Job A folded, Job B the office relocated out of my commute range, Job C was a temporary role, etc. Job flipping can be overlooked so long as you can assure me I can count on you. This can happen just by circumstance, however; if your reasons aren't good it'll cost you getting the job. In addition as the number of jobs in a short time frame increase the odds I'm going to believe you decrease.
That said when you hit three flips without a good long job between them you're in a pretty bad place where your resume is going to struggle to survive the initial cut. This often leads to taking a less desirable role for a long time to do damage control before pursuing a better position.