An exact analytical solution of the lubrication equations for the steady, isothermal, incompressible flow of a viscoelastic Oldroyd-B fluid in a hyperbolic cylindrical contracting pipe is derived. The solution is valid for values of the Deborah number, De, up to order unity (De is defined as the ratio of the longest relaxation time of the polymer to the characteristic residence time of the fluid in the pipe), all values of the ratio of the polymer viscosity to the total viscosity of the fluid, η, and typical values of the contraction ratio, Λ, encountered in experiments and practical applications. It is provided in terms of the streamfunction only and is used in the momentum balance to derive a strongly non-linear ordinary differential equation of second order with unknown a function which corresponds to a modified fluid velocity along the main flow direction. The final equation is solved semi-numerically using a fully spectral (Legendre)-Galerkin approach to resolve the unknown function almost down to machine accuracy. The exact solution for the polymer extra-stresses, which is emphasized is not the full solution of the complete lubrication equations, allows for the derivation of a variety of theoretical expressions for the average pressure-drop along the pipe. In all cases, a decrease in the pressure drop compared to the Newtonian value with increasing De, η and/or Λ is predicted. The differences between the corresponding analytical solution for the planar geometrical configuration are also identified and discussed.