4. Given that $F$ is the right focus of the ellipse $\frac{x^{2}}{a^{2}}+\frac{y^{2}}{b^{2}}=1(a>b>0)$, the line $l$ passes through point $F$ and intersects the two asymptotes $l_{1} 、 l_{2}$ of the hyperbola $\frac{x^{2}}{a^{2}}-\frac{y^{2}}{b^{2}}=1$ at points $M 、 N$, and intersects the ellipse at points $A 、 B$. If $O M \cdot M N=0, F A=$ $\frac{1}{3} A N$, then the eccentricity of the ellipse is ( ).
(A) $\frac{1}{2}$
(B) $\frac{5 \pm \sqrt{7}}{9}$
(C) $\frac{\sqrt{5 \pm \sqrt{7}}}{3}$
(D) $\frac{\sqrt{5-\sqrt{7}}}{3}$
4.C.

As shown in Figure 3, from
$$
O M \cdot M N=0,
$$

we get $O M \perp M N$.
Given $k_{O M}=-\frac{b}{a}$, the slope of line $l$ is $\frac{a}{b}$, and the focus $F(c, 0)$. Therefore, the equation of line $l$ is $y=\frac{a}{b}(x-c)$.
From $\left\{\begin{array}{l}y=\frac{a}{b}(x-c), \\ y=\frac{b}{a} x,\end{array}\right.$ we solve to get $\left\{\begin{array}{l}x=\frac{a^{2}}{c}, \\ y=\frac{a b}{c} .\end{array}\right.$ Hence, point $N\left(\frac{a^{2}}{c}, \frac{a b}{c}\right)$.
Given $F A=\frac{1}{3} A N$, we get $A\left(\frac{3 c}{4}+\frac{a^{2}}{4 c}, \frac{a b}{4 c}\right)$. Substituting into the ellipse equation, we have
$$
\frac{\left(\frac{3 c}{4}+\frac{a^{2}}{4 c}\right)^{2}}{a^{2}}+\frac{\frac{a^{2} b^{2}}{16 c^{2}}}{b^{2}}=1 .
$$

Simplifying, we get $9 e^{4}-10 e^{2}+2=0$.
Solving, we get $e^{2}=\frac{5 \pm \sqrt{7}}{9}$.