How can the max-flow and min-cut problems, if dual to one another, both have unbounded optimal value? The max-flow min-cut theorem states that the value of the maximum flow is equal to the minimum cut capacity.

It is possible that the max-flow and min-cut is equal to $\infty$.

However, reading Introduction to Linear Optimization by Bertsimas and Tsitsiklis, I get the impression that the max-flow and min-cut problems are dual to one another.

From duality theory, I know that, if the primal has finite optimal value then the dual has finite optimal value. Also, if the primal has unbounded optimal value, then the dual is infeasible and vice versa.

In the case of the max-flow and min-cut problems, how can they both have unbounded optimal value ??
Here is an example of this anomaly in linear programs:

$$
\begin{align*}
&amp; \max x &amp; &amp; \min \infty y \\
s.t.\; &amp; x \leq \infty &amp; s.t.\; &amp; y \geq 1 \\
&amp; x \geq 0 &amp; &amp; y \geq 0
\end{align*}
$$

The solution to both programs is $\infty$. What goes wrong?

The duality theorem only works when all coefficients are finite. If you go through a proof of the duality theorem you'll see exactly where it fails, and this is a nice exercise.

I should also stress that $\infty$ isn't usually regarded as a legitimate number in these contexts. If we assume all coefficients are real numbers, then $\infty$ is nothing else than a type mismatch.