I don't understand your situation entirely, as in how exactly you are using these InfoPath files, but I will answer it as well as I can.
The .NET foundation classes, to the best of my knowledge, do not provide any good functionality for CAB extraction and that requires an external library. One such library is CABLIB, which is free to use and licensed under the Code Project Open License.
If you have access to the .XSN template from whatever server code you're writing, you can use this library to extract the file, look at the manifest.xsf file inside, and determine the solution version.