1. What law applies? Secured transactions such as these typically fall under the Uniform Commercial Code (UCC) chapter 9. The seller likely broke his agreement with his creditor, but that does not necessarly mean that the security interest has failed.
2. Can the security interest be held against you? It depends on the type of security interest and whether or not it has been perfected. In general, a security interest in collateral continues even after the collateral has been sold unless the secured party has authorized the sale [UCC 9306(2)]. There are exceptions, however, and they allow the buyers of collateral sold without the secured partys authorization to take that collateral free of the security interest, even in situations when the security interest has been perfected.