In this paper, we analyse a market where the risky assets follow defaultable exponential additive processes, with coefficients depending on the default state of the assets. In this market we show that when an investor wants to maximize a utility function which is logarithmic on both his/her consumption and terminal wealth, his/her optimal portfolio strategy consists in keeping proportions of wealth in the risky assets which only depend on time and on the default state of the risky assets, but not on their price or on current wealth level; this generalizes analogous results of Pasin and Vargiolu (Econ Notes 39:65–90, 2010) in non-defaultable markets without intermediate consumption. We then present several examples of market where one, two or several assets can default, with the possibility of both direct and information-induced contagion, obtaining explicit optimal investment strategies in several cases. Finally, we study the growth-optimal portfolio in our framework and show an example with necessary and sufficient conditions for it to be a proper martingale or a strict local martingale