When choosing the public exponent e, it is stressed that $e$ must be coprime to $\phi(n)$, i.e. $\gcd(\phi(n), e) = 1$.
I know that a common choice is to have $e = 3$ (which requires a good padding scheme) or $e=65537$, which is slower but safer.
I also know that for two primes $p,q$, we have $\phi(pq) = (p - 1) (q - 1)$
Now, let me give a (simple) example:
Say I choose $e = 3$, and two random primes $p = 5$ and $q = 13$.
I can now compute $\gcd(3, \phi(5*13)) = 3$$\gcd(3, \phi(5 \cdot 13)) = 3$.
This reveals that $3$ and $\phi(n)$ are not coprime. I assume this could also happen for large values of $p$ and $q$, and likewise for another $e$. I therefore assume that the RSA algorithm must check that $\gcd(e, \phi(pq)) = 1$. But letslet's assume it doesn't.
How does RSA become vulnerable if $\gcd(e, \phi(pq)) \neq 1$?