We present a new pipeline developed to detect and characterize faint astronomical companions at small angular separation from the host star using sets of wide-field imaging observations not specifically designed for high-contrast imaging analysis. The core of the pipeline relies on Karhunen-Loéve truncated transformation of the reference point-spread function (PSF) library to perform PSF subtraction and identify candidates. Tests of reliability of detections and characterization of companions are made through simulation of binaries and generation of receiver operating characteristic curves for false-positive/true-positive analysis. The algorithm has been successfully tested on large HST/ACS and WFC3 data sets acquired for two HST Treasury Programs on the Orion Nebula Cluster. Based on these extensive numerical experiments we find that, despite being based on methods designed for observations of a single star at a time, our pipeline performs very well on mosaic space-based data. In fact, we are able to detect brown-dwarf-mass companions almost down to the planetary-mass limit. The pipeline is able to reliably detect signals at separations as close as ≳0.″1 with a completeness of ≳10%, or ~0.″2 with a completeness of ~30%. This approach can potentially be applied to a wide variety of space-based imaging surveys, from data in the existing HST archive to near-future JWST mosaics and future wide-field Roman images.