One of the most powerful, yet least-used, features of Cubase is the Logical Editor.
This is one of a myriad tasks it's very good at.
Set up your input parameters as -
Type is Note. Add a new line with the + button, set Length is less than [I used an arbitrary 20 ticks here]
The Action target you can leave at default, we're not using it.
To the right of the Function label at the bottom, set to Select [this is for testing] & hit Apply.
Check it picked all the right notes.
Flip the Function to delete & hit Apply again.
A lot of the built-in functionality actually accesses this set of functions under the hood. I just realised there's a UI specifically done for this task. It's the same deal just in a simpler interface.
Delete Notes…
Do spend some time with the Logical Editor, though - it is massively powerful. You can save presets & give them key commands too.
I used to just about live in this editor in the late 90s, when I was editing Midi for a living.
I used to know the 'berg guys quite well - we'd meet up in Frankfurt or Hamburg every so often & we'd spend many a happy hour at trade shows or in the pub hammering out solutions to complex Midi organisation problems.
The Logical Editor was the result of one such meeting. Our editors had quite specific needs that the general public really wouldn't think of, so we pushed for this type of structure so we could get down 'n dirty with low-level Midi data.
When they came back with this, it was even better than we'd hoped. They then, as above, pushed some of the easier ideas out to separate more punter-friendly GUI interfaces, relying on the same underlying engine. Brilliant work.