  We say that finite groups are isospectral if they have the same sets of
orders of elements. It is known that every nonsolvable finite group $G$
isospectral to a finite simple group has a unique nonabelian composition
factor, that is, the quotient of $G$ by the solvable radical of $G$ is an
almost simple group. The main goal of this paper is prove that this almost
simple group is a cyclic extension of its socle. To this end, we consider a
general situation when $G$ is an arbitrary group with unique nonabelian
composition factor, not necessarily isospectral to a simple group, and study
the prime graph of $G$, where the prime graph of $G$ is the graph whose
vertices are the prime numbers dividing the order of $G$ and two such numbers
$r$ and $s$ are adjacent if and only if $r\neq s$ and $G$ has an element of
order $rs$. Namely, we establish some sufficient conditions for the prime graph
of such a group to have a vertex adjacent to all other vertices. Besides
proving the main result, this allows us to refine a recent result by P. Cameron
and N. Maslova concerning finite groups almost recognizable by prime graph.
