A cubic curve can have multiple 'y' values for an 'x' value, so you're going to have to perform root finding, after rotating the cubic curve so that it's aligned with the x/y axes. http://pomax.github.io/bezierinfo/#intersections covers this concept, but the idea is this:
take your curve, defined by points {p1,p2,p3,p4}, and take your line at x=X, defined by points {p5,p6} (where p5 is some coordinate (x,...) and p6 is another coordinate(x,...). The important part is that it's a vertical line, so both points have the same x value).
translate and rotate your cubic curve and your line, together, so that your line becomes horizontal, at new height y = 0.
you can now perform cubic root finding on the curve's y function. This may generate 0, 1, 2, or 3 distinct t values.
for each of these t values: in your normal, unrotated curve, compute the (x,y) coordinate given that t value. You will now have all the y values for a given x (all points will have the same x value, too).
In the article linked, have a look at the source for the cubic curve/line example, and to see how the rotation/rootfinding works, see the BezierCurve align(Point start, Point end) {...
and float[] findAllRoots(int derivative, float[] values) {...
functions. (especially note that after rotation, we're only finding the roots for the y-function! the x-function has become irrelevant for what we want to do)