Hello!
The X-Cart 4 dev team has investigated the issue and the problem may be in the "unofficial" patches which were made available for downloading 6 years ago in this forum thread:
http://forum.x-cart.com/showthread.php?t=47262
The patches will likely break the UPS integration (and, perhaps, some custom payment integrations) in the following X-Cart versions: 3.5.x, 4.0.x, 4.1.x and 4.2.0-4.2.1.
So, if you have these patches installed in your store, you may have to revert them to get this issue fixed.