  We consider two immobile spin $1/2$ fermions in a two-dimensional magnetic
system that is close to the $ O(3)$ magnetic quantum critical point (QCP) which
separates magnetically ordered and disordered phases. Focusing on the
disordered phase in the vicinity of the QCP, we demonstrate that the
criticality results in a strong long range attraction between the fermions,
with potential $V(r) \propto -1/r^{\nu}$, $\nu \approx 0.75$, where $r$ is
separation between the fermions. The mechanism of the enhanced attraction is
similar to Casimir effect and corresponds to multi-magnon exchange processes
between the fermions. While we consider a model system, the problem is
originally motivated by recent establishment of magnetic QCP in hole doped
cuprates under the superconducting dome at doping of about 10\%. We suggest the
mechanism of magnetic critical enhancement of pairing in cuprates.
