Go-Parts
Cart 0
Your cart is empty
Add an item to see it appear here.
Wrenchy
Go-Parts Garage
Expert guides for diagnosing, troubleshooting, and replacing auto parts Expert guides for diagnosing and replacing auto parts
Browse All Articles →
🧭 Diagnostic Flowchart 🎬 Helpful Videos 🛍️ Shop This Part

P0171 on 2014-2018 Subaru Forester: System Too Lean Causes and Fixes

On a 2014-2018 Subaru Forester, P0171 is most often caused by a faulty front air/fuel ratio (O2) sensor or a vacuum leak. A common source of vacuum leaks is a cracked PCV hose or an improperly sealed air filter box. Expect to pay $150-$250 for a new Denso sensor.

19 minutes to read 2014-2018 Subaru Forester
Most Likely Cause
Faulty Front Air/Fuel Ratio (A/F) Sensor
Est. Time
1.2 hrs
Shop Labor
$100 – $500
Parts Price
$10 – $250
⚠️ Drivable, but... — You can drive, but prolonged operation in a lean condition can lead to poor fuel economy, hesitation, and potential long-term damage to the catalytic converter due to higher combustion temperatures. A lean mixture increases the risk of engine knock or detonation, which can cause serious internal engine damage, so aggressive driving should be avoided.
Key Takeaways
  • The most likely cause for P0171 on a 2014-2018 Forester is a failed front Air/Fuel Ratio (O2) sensor. Always use a Denso or OEM replacement.
  • Before replacing any parts, check for simple vacuum leaks. Ensure the air filter box is sealed correctly and inspect the PCV hose for cracks.
  • Cleaning the Mass Airflow (MAF) sensor with a dedicated spray is a cheap and easy diagnostic step that can sometimes solve the problem.
  • Driving with P0171 is possible in the short term, but it will cause poor performance and can damage the expensive catalytic converter over time.
The trouble code P0171 on a Subaru Forester means the engine's computer (ECM) has detected a "lean" condition. This indicates that for Bank 1 of the engine, the air-fuel mixture has too much air and not enough fuel. The ideal stoichiometric air-fuel ratio is approximately 14.7 parts air to 1 part fuel. The ECM tries to compensate for the lean mixture by increasing the amount of fuel injected (this is called positive fuel trim). When the long-term fuel trim adjustment exceeds its programmed limit (typically over 15-20%), it triggers the Check Engine Light.

What's Unique About the 2014-2018 Subaru Forester

For the 2014-2018 (SJ generation) Forester, the most frequent culprits for a P0171 code are the front air/fuel ratio sensor (often called the upstream O2 sensor) and vacuum leaks from deteriorated rubber hoses, particularly the PCV hose assembly. Unlike some other vehicles where a dirty MAF sensor is the primary cause, on this platform, owners and technicians frequently point to the A/F sensor failing with age. A failing A/F sensor can give false lean readings, causing the computer to enrich the mixture unnecessarily, which may lead to a noticeable smell of gas from the exhaust. Another simple but surprisingly common issue is an improperly sealed air filter housing after a filter change, which creates an unmetered air leak between the MAF sensor and the throttle body.

Symptoms You May Notice

  • Check Engine Light is on
  • Flashing cruise control light (a common Subaru feature when the CEL is active)
  • Rough or unstable idle
  • Hesitation or stumbling during acceleration
  • Reduced fuel economy
  • Engine may stall when coming to a stop
  • Audible hissing or sucking sound from the engine bay indicating a vacuum leak
  • Smell of gasoline from the exhaust if the A/F sensor is failing and causing an overly rich condition despite the lean code
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the rear (downstream) O2 sensor. The P0171 code is set based on readings from the front (upstream) Air/Fuel Ratio sensor. The rear sensor monitors catalytic converter efficiency and does not affect fuel trim in the same way.
  • Assuming the A/F sensor is bad without checking for vacuum leaks first. A vacuum leak is a very common and often cheaper fix, and it will cause the A/F sensor to report a lean condition correctly.

Most Likely Causes

  1. Faulty Front Air/Fuel Ratio (A/F) Sensor 🔴 High Probability → Shop Oxygen Sensor The front A/F sensor (upstream O2 sensor) is a very common failure item on this generation of Subaru. It can become slow to respond or send inaccurate lean readings as it ages. Oil leaks from valve cover gaskets can also saturate and ruin the sensor.
    How to confirm: A professional can use a scan tool to monitor the sensor's live data. A failing sensor may show a high Lambda value (e.g., > 1.0) while the downstream O2 sensor shows a contradictory rich condition. Often paired with heater circuit codes like P0030. The heater element resistance should be 2-3 ohms.
    Typical fix: Replace the front A/F sensor. It is highly recommended to use an OEM or Denso-branded sensor, as Subarus can be sensitive to aftermarket sensor quality. The sensor is located on the exhaust manifold, visible when looking down behind the passenger side headlight. NHTSA ODI #11486440 notes a case where an intermittent A/F sensor failure caused a rich fuel condition and affected mileage.
    Est. part cost: $150-$250
  2. Vacuum Leak 🔴 High Probability Rubber hoses and plastic components in the engine bay can become brittle and crack over time due to heat cycles. The PCV hose assembly is a frequent point of failure, often developing cracks or splits at the seams.
    How to confirm: Listen for a hissing or sucking sound around the engine while it's running. A smoke test is the most effective way to find the source of a leak by forcing smoke into the intake system and watching where it escapes. You can also carefully spray a small amount of brake cleaner or carb cleaner near suspected leak points (like gasket edges and hose connections); a change in engine idle indicates a leak as the flammable cleaner is sucked in.
    Typical fix: Replace the cracked hose or faulty gasket. Common culprits include the PCV hose, intake manifold gaskets, and the main intake air duct (between the air filter and throttle body).
    Est. part cost: $10-$100
  3. Dirty or Faulty Mass Airflow (MAF) Sensor 🟡 Medium Probability → Shop Fuel Injection Air Flow Meter The MAF sensor can become contaminated with dirt and oil, especially if an over-oiled aftermarket air filter is used, causing it to inaccurately measure the air entering the engine.
    How to confirm: The first step is to remove the sensor and clean it with a dedicated MAF sensor cleaner spray. Do not touch the delicate sensor wires. A dirty sensor will often have a visible film on its internal components. If cleaning does not resolve the issue, the sensor may need to be replaced. In NHTSA ODI #11329091, a technician cleaned the MAF sensor after finding no leaks to address a P0171 code.
    Typical fix: Clean the MAF sensor. If the problem persists, replace the sensor.
    Est. part cost: $10 (cleaner) or $100-$200 (new sensor)
  4. Improperly Sealed Air Filter Housing 🟡 Medium Probability → Shop Air Cleaner Assembly The airbox on this Forester can be tricky to seal correctly after replacing the air filter. If not properly seated and clamped, it allows unmetered air to enter the intake system past the MAF sensor.
    How to confirm: Visually inspect the engine air filter housing. Ensure it is fully closed, all clips are engaged, and the seal is seated correctly all the way around.
    Typical fix: Open the air filter housing and carefully reseal it, ensuring all clips and tabs are properly engaged.
    Est. part cost: $0

Rare But Worth Checking

  • Weak Fuel Pump or Clogged Fuel Filter: → Shop Fuel Filter If the engine is starved of fuel due to low pressure, it can cause a lean condition. This is less common than air leaks or sensor issues but should be checked if other diagnostics don't reveal the problem. A fuel pressure test can confirm this; one user reported normal pressure at 50 PSI.
  • Clogged Fuel Injectors: → Shop Fuel Injector One or more dirty fuel injectors may not be delivering enough fuel, leading to a lean mixture. This can sometimes be addressed with a quality fuel system cleaner or professional cleaning service.
  • Exhaust Leak Before A/F Sensor: A crack in the exhaust manifold or a bad gasket before the front A/F sensor can allow outside oxygen to be pulled into the exhaust stream, making the sensor report a false lean condition.
  • Stuck Open PCV Valve: → Shop PCV Valve The Positive Crankcase Ventilation (PCV) valve can get stuck open, creating a constant vacuum leak. You can sometimes diagnose this by removing the valve and shaking it; a healthy valve should rattle.
  • Fuel Line Obstruction: While rare, a manufacturer service department in NHTSA ODI #10496665 diagnosed a P0171 code as being caused by a fuel line that was disconnected or obstructed.

Diagnosis Steps

  1. Read the code with an OBD-II scanner to confirm P0171 is the primary code. Check for any other codes like P0030 which would point towards a faulty A/F sensor.
  2. Visually inspect the engine bay. Look for obvious issues like a disconnected vacuum hose, a cracked intake boot, or an improperly latched air filter box.
  3. Listen for hissing sounds at idle, which would indicate a vacuum leak. A common source is a cracked PCV hose near the throttle body.
  4. With the engine off, remove and inspect the MAF sensor. Clean it using a dedicated MAF sensor cleaner spray and let it dry completely before reinstalling.
  5. 🎬 Watch: Step-by-step guide to cleaning your MAF sensor safely.
  6. Using a scan tool, monitor short-term (STFT) and long-term fuel trims (LTFT). High positive numbers (e.g., >15%) confirm the lean condition. If trims are high at idle but normalize at higher RPM (e.g., 2500 RPM), a vacuum leak is the most likely cause. If trims are high across all RPMs, suspect the MAF sensor, A/F sensor, or a fuel delivery issue.
  7. If a vacuum leak is suspected, perform a smoke test to definitively locate any leaks in the intake manifold, PCV system, or other hoses.
  8. Test the front A/F (O2) sensor's response using a scan tool. A healthy sensor will show rapidly changing data. A slow, lazy, or stuck reading (like a Lambda value > 1.0) indicates it needs replacement.
  9. If all else fails, check fuel pressure with a gauge to rule out a weak fuel pump or clogged filter. A reading of around 50 PSI at idle is expected.

Parts You'll Likely Need

  • Front Air/Fuel Ratio Sensor (Upstream O2 Sensor) (OEM #22641AA640) — This is the most common part to fail and cause a P0171 code on this vehicle due to age and wear. The OEM part is confirmed as 22641AA640.
    Trusted brands: Denso (OEM supplier), Subaru (OEM)
    OEM price range: $200-$280
    Aftermarket price range: $150-$220
  • PCV Hose (OEM #99071AD53A (example, varies by specific location/engine)) — The rubber hose can crack or collapse, creating a significant vacuum leak. 🎬 See how to replace a cracked PCV valve and hose. It is a very common failure point.

Related Codes That Often Appear With This One

  • P0030: HO2S Heater Control Circuit (Bank 1, Sensor 1) - This often accompanies a failed A/F sensor, as the heater element inside the sensor is a common failure point.
  • P2096: Post Catalyst Fuel Trim System Too Lean (Bank 1) - This indicates the downstream O2 sensor is also detecting a lean condition, further confirming the issue is not isolated to a single faulty sensor.
  • C1424: Engine Control Module Fault - This chassis code may appear on more advanced scanners alongside P0171, particularly when a significant vacuum leak causes severe driveability issues like stalling.

Technical Service Bulletins (TSBs) & Recalls

  • TSB 11-199-20 (Feb 2020): Applies to 2014-18 Forester 2.0L DIT and other models. Announces an ECM reprogramming file to optimize logic for cold weather starting and idle stability. In these conditions, A/F learning values could trend lean, potentially contributing to or being related to a P0171 code.

Platform-Specific Known Issues

  • Cracked PCV Hose Assembly: → Shop PCV Valve Hose The PCV hose, especially the section near the throttle body, is prone to cracking from heat and age, causing a very common and sometimes large vacuum leak. Owners often report hearing a loud sucking or hissing noise when this hose fails.
  • Oil Leaks Contaminating A/F Sensor: On the boxer engine, the valve cover gaskets are located above the exhaust manifold. Oil leaks from these gaskets can drip directly onto the front A/F sensor and its wiring, causing it to fail prematurely.
  • Brake Booster Check Valve Leaks: A manufacturer service bulletin reference in NHTSA ODI #10865341 describes a P0171 fault traced to a vacuum leak around the brake booster check valve, which was found to be cracked.

Mechanic-Grade Diagnostic Values

  • Front A/F Sensor Heater Resistance — expected: 2.0 - 3.0 Ohms. Failure: Reading is significantly higher (e.g., 60 Ohms) or open loop (infinite resistance).
  • Front A/F Sensor Voltage (at ECM) — expected: Signal (+): 2.7 - 2.9 V at idle. Signal (-): 2.35 - 2.55 V at idle.. Failure: Voltages outside of this range indicate a potential sensor or wiring issue.
  • Long Term Fuel Trim (LTFT) at idle — expected: Ideally close to 0%, but under +/- 10% is generally acceptable.. Failure: Sustained high positive values, such as +28.9%, strongly indicate a lean condition the ECM is trying to correct.
  • Generic OBD-II Lambda (Equivalence Ratio) — expected: Should fluctuate around 1.0.. Failure: A value stuck significantly above 1.0 (e.g., 1.2) indicates the A/F sensor is seeing a persistent lean condition, even if the downstream O2 sensor reports rich.
  • Fuel Pressure at Idle — expected: ~50 PSI. Failure: Significantly lower pressure indicates a fuel delivery problem (pump, filter, regulator).

Hidden / Shadow Codes Worth Checking

  • C1424: Engine Control Module Fault. This is a chassis code, not an engine code. (see via May require a more advanced scanner than a basic OBD-II reader. It was reported alongside a P0171 when the vehicle had a severe vacuum leak from the intake manifold gaskets, causing rough idle and stalling.)

Wiring & Ground Locations

  • ECM Connector B135 — At the Engine Control Module (ECM).. This connector contains the primary signal wires for the front A/F sensor. Pin 9 is signal (+) and Pin 8 is signal (-). These are the correct points to back-probe for accurate voltage testing.

Real Owner Repair Stories

  • NHTSA ODI #11712991 — An owner reported that their engine stalled with code P0171 present and several dashboard lights illuminated; following the stall, the vehicle would only crank but not start.
  • Reddit user Lc3761 on r/SubaruForester (2019 Subaru Forester) — All dashboard warning lights on, rough idle, stalling at stop lights, codes P0171 and C1424.
    ❌ Tried (didn't work) Initial thought was a simple vacuum leak or sensor.
    ✅ What actually fixed it The intake manifold was leaking. The fix involved replacing the EGR gasket, the intake manifold gasket set, and the throttle body gasket set.
  • YouTube user 'checkengine' (commenter) (2015 Subaru Forester) — Check Engine Light with code P0171, followed by an idle problem after clearing the code.
    ❌ Tried (didn't work) Clearing the code initially did not solve the underlying issue.
    ✅ What actually fixed it The air filter compartment was not fully sealed at the bottom after an oil change service. The owner reseated the airbox, clipped it shut, cleared the code, and then performed an idle relearn procedure.
  • YouTube channel 'Real Auto Solutions' (Subaru Forester Turbo (EJ255)) — P0171, audible vacuum leak.
    ❌ Tried (didn't work) The problem was not a simple hose.
    ✅ What actually fixed it A plastic vacuum nipple on the intake manifold itself had broken off, requiring replacement of the entire intake manifold. Brittle PCV breather hoses on the rocker covers were also replaced at the same time.

"I Checked Everything" — The Actual Cause

  • A leaking brake booster diaphragm. This is an internal leak that won't show smoke externally. The definitive test is to clamp the vacuum hose going to the booster with the engine running and watch the short-term fuel trims on a scan tool. If the trims quickly drop to normal, the booster is the source of the unmetered air.
  • An exhaust leak before the upstream A/F sensor. Cracks in the exhaust manifold or a failed manifold gasket can suck in outside air due to the exhaust pulse effect. This tricks the A/F sensor into reading lean. An intake smoke test will come back clean; the exhaust system itself must be tested for leaks.

When the Usual Fixes Don't Work

  • In one case on a 2015 Forester, the owner replaced the MAF sensor, both upstream and downstream O2 sensors, the PCV valve, and spark plugs in an attempt to fix a P0171 code, but the issue persisted. They also performed a homemade smoke test that revealed no leaks. This demonstrates that even after replacing all the most common culprits, the root cause can be elusive and may be a more complex issue like leaking intake manifold gaskets or a faulty brake booster, which were the final fixes in other documented cases.

Model Year Variations Within This Range

  • Later models in the generation (approx. 2017-2018) and newer Subarus: The main intake air duct material was changed from a more durable, flexible rubber to a harder plastic. This hard plastic duct is known to split at the seam, causing a large vacuum leak and a P0171 code.

Diagnostic Flowchart

Real Owner Stories

Aggregated from forums and TSBs cited above. Mileages and costs reflect what owners reported in those sources.

2015 Subaru Forester

Symptoms: Triggered a P0171 code.

What fixed it: Recommended checking the upstream O2 sensor, cleaning the MAF and throttle body, and checking the PCV valve.

Source hint: reddit.com/r/SubaruForester

2016 Subaru Crosstrek (2.0L FB20B engine)

Symptoms: P0171 check engine light.

What fixed it: Discovered a valve cover gasket leak had saturated the front O2 sensor. Replacing both the gasket and the sensor fixed the issue.

Source hint: reddit.com/r/Crosstrek (URL: https://www.reddit.com/r/Crosstrek/comments/gsu13h/p0171_check_engine_light/)

2020 Subaru WRX (2.0L FA20F DIT engine)

Symptoms: P0171 code causing issues specifically during hot starts at idle.

What fixed it: Traced to a faulty front O2 sensor and replaced it.

Source hint: reddit.com/r/WRX (URL: https://www.reddit.com/r/WRX/comments/16wz15p/replacing_front_o2_sensor_fixed_my_p0171_issues/)

2014-2018 Subaru Forester

Symptoms: Loud sucking or hissing noise from the engine bay accompanied by a P0171 code.

What fixed it: Replaced the cracked PCV hose assembly near the throttle body.

Source hint: subaruforester.org / Vehicle Specific Issues

Frequently Asked Questions

Does TSB 11-199-20 apply to my Forester for the P0171 code?
Yes, if you have a 2014-2018 Forester with the 2.0L DIT engine. This TSB involves an ECM reprogramming file to optimize logic for cold weather starting and idle stability. Under these conditions, A/F learning values could trend lean, potentially contributing to a P0171 code.
Why is my cruise control light flashing along with the check engine light?
A flashing cruise control light is a common Subaru feature that activates whenever the Check Engine Light is on. It disables the cruise control system until the underlying issue, such as the P0171 lean code, is resolved.
Should I use an aftermarket front A/F sensor to save money on this repair?
It is highly recommended to use an OEM or Denso-branded sensor. Subarus are known to be sensitive to aftermarket sensor quality, and using a cheaper alternative may not resolve the P0171 code or could cause it to return quickly.
Can an oil leak cause a P0171 code on my Forester?
Yes. On this boxer engine, the valve cover gaskets are located above the exhaust manifold. Oil leaks can drip directly onto the front A/F sensor and its wiring, saturating it and causing it to fail prematurely, which leads to a P0171 code.
I just changed my engine air filter and got a P0171 code. What happened?
The airbox on this generation of Forester can be tricky to seal correctly. If it is not properly seated and clamped, unmetered air can enter the intake system past the MAF sensor, triggering a lean condition.
I hear a loud hissing noise from the engine bay. Is this related to P0171?
Yes, a loud hissing or sucking noise is a strong indicator of a vacuum leak. On the 2014-2018 Forester, the PCV hose assembly near the throttle body is highly prone to cracking from heat and age, causing a large vacuum leak and a P0171 code.
2015 Subaru Forester Check Engine Error P0171 FIX
2015 Subaru Forester Check Engine Error P0171 FIX
2012-2018 Subaru Forester PCV Valve Replacement
2012-2018 Subaru Forester PCV Valve Replacement
Changing a Subaru Forester PCV Valve and Intake Filter| How To
Changing a Subaru Forester PCV Valve and Intake Filter| How To
How to Clean the MAF Sensor on a 2014–2018 Subaru Forester (DIY Guide)
How to Clean the MAF Sensor on a 2014–2018 Subaru Forester (DIY Guide)
2015 Subaru Forester Diagnosing a P0171 Fault
2015 Subaru Forester Diagnosing a P0171 Fault
Wrenchy
Article researched & written by
Go-Parts' AI research assistant. Every article is backed by live web research, verified OEM data, and real technician knowledge — so you get accurate, up-to-date information you can trust.
Meet Wrenchy → Updated May 30, 2026

The information in this article is provided for general reference and educational purposes only. Vehicle specifications, procedures, and part compatibility can vary by production date, trim level, and region. Always consult your vehicle's factory service manual and verify part numbers before purchasing or performing repairs. Safety-critical components such as airbags, seat belts, and braking systems should be installed by a qualified professional.

Year Coverage
This article covers the OBD-II Code P0171 for:
  • Subaru Forester: 20142015201620172018
In this article
🧭 Diagnostic Flowchart
Jump to ▴

Email This Guide

We'll send you a link to this article so you can read it later or share it.

Added to cart · Part