Let {Xi} be a sequence of independent, identically distributed random variables with an intermediate regularly varying right tail F̄. Let (N, C1, C2,…) be a nonnegative random vector independent of the {Xi} with N∈ℕ∪ {∞}. We study the weighted random sum SN=∑{i=1}NCiXi, and its maximum, MN=sup{1≤kN+1∑i=1kCiXi. This type of sum appears in the analysis of stochastic recursions, including weighted branching processes and autoregressive processes. In particular, we derive conditions under which P(MN > x)∼ P(SN > x)∼ E[∑i=1NF̄(x/Ci)] as x→∞. When E[X1]>0 and the distribution of ZN=∑ i=1NCi is also intermediate regularly varying, we obtain the asymptotics P(MN > x)∼ P(SN > x)∼ E[∑i=1NF̄}(x/Ci)] +P(ZN > x/E[X1]). For completeness, when the distribution of ZN is intermediate regularly varying and heavier than F̄, we also obtain conditions under which the asymptotic relations P(MN > x) ∼ P(SN > x)∼ P(ZN > x / E[X1] hold.