Not usually, but of course, it's impossible to say with certainty.
If the user has been rigorous about keeping the older versions updated, that
definitely mitigates the risk. If the user has 1.2 or older, well, they're
SOL I guess, but it's their own fault. 1.3 and later get security updates.
What I mean is this.
Say that a system has any non-specific version of JRE installed (sake
of argument, say it has 1.5.06). A vulnerability is discovered for
1.5.06 (let's call it Exploit_06). Sun releases JRE version 1.5.07
that is not vulnerable to Exploit_06.
A user downloads the off-line install package for JRE 1.5.07 and runs
it. JRE 1.5.07 is now installed. It's been the experience of many
observers of the computer security and malware scene that the previous
version of the JRE (1.5.06 in this case) was NOT un-installed. Now
the system has both versions (1.5.06 and 1.5.07) installed. The user
probably doesn't know that.
Now let's say that malicious web-code is devised and deployed to
trigger the Exploit_06 vulnerability. The user exposes his system to
the malicious code. The popular thinking in security circles is that
the malicious code can specify or instruct the host PC to use a
specific version of the JRE if it's installed on a system. Naturally,
it must be within the normal code base or instruction set of Java for
such a command or instruction to exist.
If such a mechanism does exist, then it would seem to be a huge
vulnerability to allow web-code to specify that a particular version
of the JRE should be used to execute the code, but this can really
only be leveraged if the default behavior of the JRE installer code is
to NOT un-install previous versions (ie previous patch or update sub-
version) of the JRE.
I don't know if I've gotten a clear answer here as to whether or not
the default behavior of the end-user on-line or off-line JRE installer
will un-install any previous patch-level sub-version. In my example
above, will the 1.5.07 installer remove the previous 1.5.06
installation? Will the 1.5.17 installer remove 1.5.16 or even all
previous 1.5.x versions?
A malicious app would have to insist on using only an older version
of Java (doable with Java Web Start AIUI - not sure if possible with
applets)
What if we're talking about malicious web-code (and NOT an app) ?
hope the user has that version installed (which cannot be
guaranteed)
No it can't be, but the mal-code is dependent on the presence of the
specific vulnerable version so it might as well try to ask for it if
the exploit is going to succeed.
and depend on the user not having kept it up to date.
Again, even if the user has an up-to-date JRE version, does the
presence of an installed-and-still-functional older version make the
presence of the newer version irrelevant?
(again, as I describe it, 1.5.09 is a newer "version" when compared to
1.5.08. You people may not consider them to be different versions,
and if not then I don't know what you call them).
Casual users are more likely to have current versions of
Java, and to be running the Java update service in the
background, keeping their Java patched. Plus there just
aren't so many casual users.
??
You have got to be kidding. I bet if you look at the average home or
SOHO PC, that it will have an old version of Java installed, that it
will not be doing any automatic java updates, and there are MILLIONS
more "casual" users than "professional" computer users or developers.
Has your research uncovered any such incidents?
There are 26 historical security advisories for Sun Java JRE 1.5.x:
http://secunia.com/advisories/product/4228/?task=advisories
There are 11 historical security advisories for Sun Java JRE 1.6.x:
http://secunia.com/advisories/product/12878/?task=advisories
Many or most of those 37 advisories rank high (4 out of 5) on the
criticality scale.
Some examples of discussions about those vulnerabilities:
http://isc.sans.org/diary.html?storyid=2934
"As we’ve confirmed that exploits such as the one described in this
diary are in the wild, take a minute or two and confirm that you’re
running the latest version."
http://www.vnunet.com/vnunet/news/2172403/java-exploits-brewing
"Attackers have released exploit code targeting two previously patched
flaws in Sun Microsystems' Java Runtime Environment (JRE) and Java
Software Development Kit (SDK)."
See also:
http://www.securiteam.com/securitynews/6M00E0ANFO.html