The controlling statute in the United States Bankruptcy Code is 11 U.S.C. § 541(d) which states:
Property in which the debtor holds, as of the commencement of the case, only legal title and not an equitable interest, such as a
mortgage secured by real property, or an interest in such a mortgage,
sold by the debtor but as to which the debtor retains legal title to
service or supervise the servicing of such mortgage or interest,
becomes property of the [bankruptcy] estate under subsection (a)(1) or (2) of this section only to the extent of the debtor’s legal title to such
property, but not to the extent of any equitable interest in such
property that the debtor does not hold.
For the purposes of a trustee of a typical trust, only the language in bold is relevant (strictly speaking, this is not an exemption from creditors, which would be found at 11 U.S.C. § 522, but a part of the definition of what a debtor owns).
Only property that is part of the bankruptcy estate is subject to distribution to creditors of the bankrupt.
(The language in not in bold pertains to the special case of mortgages sold in the secondary market to new lenders in which the originator of the mortgage remains the nominee owner, which is economically important in financial company bankruptcies, but not a situation the average person would encounter very often.)
In general, under non-bankruptcy law, creditors of a trustee may not acquire an interest in property greater than that of the debtor (unless a statute such as the holder in due course rule, see, e.g., § 4-3-302, Colorado Revised Statutes, provides otherwise), so the same rule applies outside of bankruptcy. See, e.g., Casey v. Cavaroc, 96 U.S. 467, 473–74 (1877).
Indeed, this subtle rule of law governing the creditors of a trustee was actually the earliest form of limited liability in common law jurisdiction and was used as a model for subsequently devised limited liability entities such a corporations, as explained by John Morley in the Columbia Law Review (open access). He explains:
If a trustee went bankrupt, his creditors could seize the property he
owned personally for his own benefit but not the property he held as
trustee in trust for others.43 The creditors could take the trustee’s
personal farm, for instance, but not the farm he held in trust for the
beneficiaries. As Professors Henry Hansmann and Ugo Mattei have shown,
this was an extraordinary innovation because it limited the rights of
a trustee’s creditors even if the creditors had not personally agreed
to the limitations.44 This rule emerged gradually over time, but its
essential contours were in place by the mid-1400s.45
43 Henry Hansmann & Ugo Mattei, The Functions of Trust Law: A
Comparative Legal and Economic Analysis, 73 N.Y.U. L. Rev. 434, 454–56
(1998).
44 See id.
45 At first, the rule probably operated indirectly. Today, an
unsecured creditor can seize any property—real or personal—of a debtor
as long as the property is not already committed to a security
interest. Cf. Edward M. Iacobucci & George G. Triantis, Economic and
Legal Boundaries of Firms, 93 Va. L. Rev. 515 (2007) (noting the legal
implications of how a firm is structured and arguing that a creditor
of an entity has a formal right to any of that entity’s property). In
late medieval and early modern times, however, a creditor generally
could not take land (as distinct from personal property) unless the
owner had specifically given the creditor a security interest in it.
See Claire Priest, Creating an American Property Law: Alienability and
Its Limits in American History, 120 Harv. L. Rev. 385, 401–07 (2006)
(describing limits on the alienability of land in late-medieval
English law). Thus, there was no need for a rule in early trust law
that protected real property from a trustee’s unsecured creditors.
Since no one could take real property from a trustee unless the
trustee specifically pledged it, there was no point in cutting off the
claims of creditors who had no pledge. It was enough simply to have a
rule that protected property from the secured creditors who had
received the pledges. This rule was already implicit in the remedies
against a trustee’s transferees and pledgees that the Chancery began
enforcing in the mid-1400s. See supra notes 40–41 and accompanying
text (discussing the use of specific performance and property recovery
as remedies). In any case, Lord Chancellor Nottingham began fully
protecting all forms of trust property from a trustee’s unsecured
creditors in the late seventeenth century. See, e.g., Bennet v.
Davis (1725) 24 Eng. Rep. 746 (Ch) 746–47; 2 P. Wms. 316, 316–19;
Finch v. Earl of Winchelsea (1715) 24 Eng. Rep. 387 (Ch) 387–90; 1 P. Wms. 277, 277–83; Burgh v. Francis (1673) 36 Eng. Rep. 971 (Ch)
971; 3 Swanst. 550, 550; Turner, supra note 38, at 46–48.
N.B. Professor Henry Hansmann's book "The Ownership of Enterprise", while hard to find, is probably the most insightful book ever written on why different forms of organizations (especially cooperatives v. nonprofits v. investor owner firms) are used in different circumstances.