The firefighter problem is the following discrete-time game on a graph. Initially, a fire starts at a vertex of the graph. In each round, a firefighter protects one vertex not yet on fire, and then the fire spreads to all unprotected neighbors of the vertices on fire. The objective of the firefighter is to save as many vertices as possible. The surviving rate of a graph is the average percentage of vertices that can be saved when a fire starts randomly at one vertex of the graph, which measures the defense ability of a graph as a whole. In this paper, we study the surviving rates of graphs with bounded treewidth. We prove that the surviving rate of every n-vertex outerplanar graph is at least 1 - (log n n ), which is asymptotically tight. We also prove that if k firefighters are available in each round, then the surviving rate of an n-vertex graph with treewidth at most k is at least 1 - O(k2 log n n ). Furthermore, we show that the greedy strategy of Hartnell and Li [Congr. Numer., 14...