Abstract Let Irr ( G ) {\operatorname{Irr}(G)} denote the set of complex irreducible characters of a finite group G, and let cd ( G ) {\operatorname{cd}(G)} be the set of degrees of the members of Irr ( G ) {\operatorname{Irr}(G)} . For positive integers k and l, we say that the finite group G has the property 𝒫 k l {\mathcal{P}^{l}_{k}} if, for any distinct degrees a 1 , a 2 , … , a k ∈ cd ( G ) {a_{1},a_{2},\dots,a_{k}\in\operatorname{cd}(G)} , the total number of (not necessarily different) prime divisors of the greatest common divisor gcd ( a 1 , a 2 , … , a k ) {\gcd(a_{1},a_{2},\dots,a_{k})} is at most l - 1 {l-1} . In this paper, we classify all finite almost simple groups satisfying the property 𝒫 3 2 {\mathcal{P}_{3}^{2}} . As a consequence of our classification, we show that if G is an almost simple group satisfying 𝒫 3 2 {\mathcal{P}_{3}^{2}} , then | cd ( G ) | ⩽ 8 {\lvert\operatorname{cd}(G)\rvert\leqslant 8} .