The problem can be corrected by upgrading the affected package to version 1.0.2-1ubuntu0.2 (for Ubuntu 4.10), or 1.0.2-2ubuntu0.2 (for Ubuntu 5.04). In general, a standard system upgrade is sufficient to effect the necessary changes.
Details follow:
USN-158-1 fixed a command injection vulnerability in the "zgrep" utility. It was determined that the "bzgrep" counterpart in the bzip2 package is vulnerable to the same flaw.
bzgrep did not handle shell metacharacters like '|' and '' properly when they occurred in input file names. This could be exploited to execute arbitrary commands with user privileges if bzgrep was run in an untrusted directory with specially crafted file names.