7. $\sqrt{3}$.

Let $\alpha$ be the plane of the section. Extend $A K$ and $B F$ to intersect at point $P$, then $P$ lies on plane $\alpha$. Therefore, line $C P$ is the intersection line of $\alpha$ and plane $B C G F$. Let $C P$ intersect $F G$ at point $L$, and quadrilateral $A K L C$ is the section, as shown in Figure 3.

Since plane $A B C \parallel$ plane $K F L$, and $A K$, $B F$, $C L$ intersect at point $P$, $A B C - K F L$ forms a frustum.

Assume the edge length of the cube is 1. Then the volume of the cube is 1. According to the given conditions, the volume of the frustum $A B C - K F L$ is $V = \frac{1}{4}$.
Let $P F = h$. Then $\frac{K F}{A B} = \frac{F L}{B C} = \frac{P F}{P B} = \frac{h}{h+1}$.
Note that $P B$ and $P F$ are the heights of the pyramids $P - A B C$ and $P - K F L$, respectively.
$$
\begin{array}{l}
\text { Then } \frac{1}{4} = V = V_{P - A B C} - V_{P - K F L} \\
= \frac{1}{6} A B \cdot B C \cdot P B - \frac{1}{6} K F \cdot F L \cdot P F \\
= \frac{1}{6}(h+1)\left(1 - \left(\frac{h}{h+1}\right)^{3}\right) = \frac{3 h^{2} + 3 h + 1}{6(h+1)^{2}} \\
\Rightarrow 3 h^{2} = 1 \Rightarrow h = \frac{1}{\sqrt{3}} \\
\Rightarrow \frac{E K}{K F} = \frac{A E}{P F} = \frac{1}{h} = \sqrt{3} .
\end{array}
$$
7. As shown in Figure 1, a cross-section of the cube $A B C D-E F G H$ passes through vertices $A, C$, and a point $K$ on edge $E F$, dividing the cube into two parts with a volume ratio of 3:1. Then the value of $\frac{E K}{K F}$ is $\qquad$