Software framework is an abstraction; we have common code which provides generic functionality which can be specialized by the user by specialized or overridden code to provide specific functionality.
Where as specification is a set of requirements, which should be satisfied by a material, product or service.