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 2015-2021 Subaru WRX: Lean Code Causes and Fixes

On a 2015-2021 Subaru WRX, code P0171 is most often caused by a vacuum leak from a cracked or disconnected hose (especially around the charge pipe or intake manifold), a dirty MAF sensor, or a failing front O2 sensor. A smoke test is the best way to find leaks, and cleaning the MAF sensor is a common first step. Aftermarket intakes are also a frequent trigger.

20 minutes to read 2015-2021 Subaru WRX
Most Likely Cause
Vacuum Leak
Est. Time
1.8 hrs
Shop Labor
$100 – $850
Parts Price
$10 – $400
⚠️ Drivable, but... — You can drive, but prolonged operation in a lean condition can increase combustion temperatures, potentially leading to engine damage over time, including to the catalytic converter. You may also experience rough idling, poor acceleration, stalling, and reduced fuel economy.
Key Takeaways
  • P0171 on a 2015-2021 WRX is almost always caused by unmetered air entering the engine after the MAF sensor.
  • Start your diagnosis by cleaning the MAF sensor, a quick and inexpensive step.
  • The most reliable way to find a vacuum leak is with a smoke test.
  • Avoid replacing parts like the O2 sensor or fuel pump without proper diagnosis.
  • Be aware that aftermarket intakes require a specific ECU tune to avoid this code.
The code P0171 means 'System Too Lean (Bank 1)'. This indicates the engine's computer (ECU) has detected too much oxygen and not enough fuel in the exhaust gases on the first bank of cylinders. The ECU tries to compensate by adding more fuel (increasing long-term fuel trims), but it has reached its maximum adjustment limit, triggering the Check Engine Light. For the WRX's four-cylinder boxer engine, 'Bank 1' refers to the entire engine.

What's Unique About the 2015-2021 Subaru WRX

The FA20DIT engine in the 2015-2021 WRX is a direct-injected and turbocharged platform, making it particularly sensitive to unmetered air. Vacuum leaks are a very common cause of P0171 on these cars, often originating from intercooler connections, the plastic turbo inlet pipe, PCV hoses, or intake manifold gaskets that can become brittle in cold climates. Aftermarket intakes, especially those with poor filter design or incorrect tuning, are also a frequent source of this code because they can cause airflow turbulence across the MAF sensor.

Symptoms You May Notice

  • Check Engine Light is on
  • Rough or unstable idle, sometimes feeling like it will stall
  • Hesitation or stumbling during acceleration
  • Reduced engine power
  • Disabling of other systems like traction control, hill start assist, and cruise control, which is a standard Subaru safety feature when a CEL is triggered
  • Increased fuel consumption
  • Audible hissing sound from the engine bay if a significant vacuum leak is present
  • In severe cases, the vehicle may stall and enter a "crank but no start" condition, as described in NHTSA ODI #11712991
⚠️ Don't Waste Money on the Wrong Fix
  • Replacing the O2 sensor when the actual problem is a vacuum leak.
  • Replacing the fuel pump without first verifying fuel pressure with a gauge.
  • Assuming an aftermarket intake is not the problem, when it is often the cause if not properly tuned or if the filter is causing airflow issues.

Most Likely Causes

  1. Vacuum Leak 🔴 High Probability The complex intake plumbing with a turbocharger, intercooler, and numerous vacuum lines provides many potential failure points. Hoses can crack, become disconnected, or gaskets can fail. Common specific culprits include the charge pipe to throttle body connection, the turbo inlet pipe, and vacuum caps popping off after an Air-Oil Separator (AOS) installation.
    How to confirm: Perform a smoke test on the intake system to visually identify where unmetered air is entering. This is the most definitive method. 🎬 See how to perform a smoke test on your WRX. A hissing sound may also be audible. Spraying brake cleaner or starting fluid near suspected leak points while monitoring short-term fuel trims can also identify leaks (RPMs will change when the fluid is sucked in).
    Typical fix: Replace the cracked hose, loose clamp, or failed gasket. A YouTube repair video for a 2017 WRX showed the P0171 code was caused by a vacuum cap that had popped off an intake manifold port, which was originally installed as part of an AOS kit. 🎬 Watch this 2017 WRX repair video to see the fix.
    Est. part cost: $10-$150
  2. Dirty or Faulty Mass Airflow (MAF) Sensor 🔴 High Probability → Shop Fuel Injection Air Flow Meter Oiled aftermarket air filters are notorious for contaminating the sensor. Even with the stock filter, fine dust can accumulate on the sensor element over time, causing incorrect airflow readings that lead to a lean condition. NHTSA ODI #11329091 notes a case where a technician cleaned the MAF sensor after finding no visible leaks to address a P0171 fault.
    How to confirm: Remove the sensor (located on the intake tract after the airbox) and inspect for dirt or oil. Cleaning it is a simple first step. A scan tool can be used to monitor MAF readings to see if they are erratic or out of specification at idle and under load. A rule of thumb is that at idle, the MAF should read approximately as many grams/second as the engine's displacement in liters (e.g., ~2.0 g/s for the 2.0L FA20DIT).
    Typical fix: Clean the sensor using a dedicated MAF sensor cleaner spray. Do not use brake or carburetor cleaner, as they can damage the sensor. If cleaning doesn't resolve the issue, the sensor must be replaced.
    Est. part cost: $10 (cleaner) - $200 (new sensor)
  3. Faulty Front Air/Fuel Ratio (O2) Sensor 🟡 Medium Probability → Shop Oxygen Sensor The front O2 sensor (also called an Air/Fuel Ratio or AFR sensor) is a critical component that can degrade over time, leading to slow or inaccurate readings that cause the ECU to miscalculate the fuel mixture. NHTSA ODI #11486440 describes an intermittent failure of this sensor causing fueling issues and affecting mileage.
    How to confirm: Use a scan tool to graph the sensor's voltage or current. A healthy sensor will show rapid fluctuations. A slow, lazy, or stuck sensor needs replacement. Many owners recommend replacing it after 80,000-100,000 miles as preventative maintenance.
    Typical fix: Replace the front (pre-catalyst) O2 sensor. Using an OEM or Denso branded sensor is highly recommended, as forums report issues with other aftermarket brands.
    Est. part cost: $100-$250
  4. Low Fuel Pressure ⚪ Low Probability While less common than air leaks, a weak in-tank fuel pump, a failing high-pressure fuel pump (HPFP), or clogged fuel filter can restrict fuel flow, leading to a lean condition. NHTSA ODI #10496665 reports a P0171 where the vehicle entered limp mode and the diagnosis was a disconnected fuel line.
    How to confirm: Connect a fuel pressure gauge to the fuel system and verify the pressure is within the manufacturer's specifications. The FA20DIT has two systems: a low-pressure in-tank pump that should supply a constant pressure (around 4 bar) to the HPFP, and the high-pressure system which is commanded by the ECU up to 150-170 bar.
    Typical fix: Replace the failing fuel pump, fuel pump O-rings, or clogged fuel filter.
    Est. part cost: $200-$700

Rare But Worth Checking

  • Leaking Brake Booster: A vacuum leak can occur inside the brake booster, which is difficult to detect with a standard smoke test. NHTSA ODI #10865341 describes a P0171 fault traced to a vacuum leak around a cracked brake booster check valve.
  • Exhaust Leak Before the O2 Sensor: → Shop Oxygen Sensor A crack in the exhaust manifold, turbo-to-downpipe (J-pipe) gasket, or a loose O2 sensor can allow outside air to be pulled into the exhaust stream. This makes the front A/F sensor read a false lean condition, causing the ECU to add unnecessary fuel.
  • Incorrectly Installed or Untuned Aftermarket Intake: Aftermarket cold air intakes that are not properly tuned for the vehicle's ECU will alter the MAF sensor readings and frequently cause a P0171 code. A YouTube video specifically calls out the design of some Cobb intakes, where the filter's orientation can create turbulence and inaccurate MAF readings, leading to high fuel trims and the P0171 code.
  • 🎬 Watch how an incorrectly installed Cobb intake causes lean codes.
  • Cracked plastic intercooler end tanks: The factory top-mount intercooler uses plastic end tanks which can develop hairline cracks over time from heat and pressure cycling, creating a hard-to-find vacuum/boost leak.

Diagnosis Steps

  1. Read the code with an OBD-II scanner and check for any other codes. Note if other warning lights (ABS, traction control) are on, as this is common.
  2. Check long-term fuel trim (LTFT) values using a scan tool. High positive numbers (e.g., +15% or more) confirm the ECU is compensating for a lean condition.
  3. Visually inspect the engine bay for any obviously disconnected or cracked vacuum hoses, especially around the intake manifold, intercooler, charge pipe, and PCV system.
  4. Remove and clean the Mass Airflow (MAF) sensor with dedicated MAF cleaner spray. Reinstall and clear codes to see if the problem returns.
  5. If the code persists, perform a smoke test to definitively locate any vacuum leaks in the intake system. This is the most effective method.
  6. If no vacuum leaks are found, test the front Air/Fuel Ratio (O2) sensor's operation with a scan tool to check for slow or biased readings.
  7. If the lean condition only occurs at idle, investigate the brake booster by monitoring fuel trims while pressing and releasing the brake pedal.
  8. As a final step, test the fuel pressure to rule out a weak pump or clogged filter.

Parts You'll Likely Need

  • Mass Airflow (MAF) Sensor Cleaner — Cleaning the MAF sensor is often the first, easiest, and cheapest step in diagnosing a P0171 code.
    Trusted brands: CRC, Liqui Moly
    Aftermarket price range: $10-$15
  • Front Air/Fuel Ratio Sensor (OEM #22641AA680) — This sensor is a common failure item that directly measures the air/fuel ratio. When it fails, it can cause a P0171 code.
    Trusted brands: Denso (OEM supplier, P/N 234-9136)
    OEM price range: $200-$250
    Aftermarket price range: $120-$180
  • PCV Vacuum Hose Assembly (OEM #11815AC900 (example for later STI, confirm for WRX)) — These hoses can become brittle and crack, creating a significant vacuum leak. A TSB was issued for an improved design on some models.
    Trusted brands: Subaru (OEM)
    OEM price range: $20-$50
    Aftermarket price range: $15-$30
  • Intake Manifold Gaskets — The orange rubber o-ring gaskets between the intake manifold and TGV housings can shrink and harden in cold climates, causing leaks on cold starts as noted in a Subaru TechTIPS bulletin.
    Trusted brands: Subaru (OEM), Fel-Pro
    OEM price range: $20-$40
    Aftermarket price range: $15-$30

Related Codes That Often Appear With This One

  • P0300 — A severe lean condition can cause random misfires across multiple cylinders as the air-fuel mixture fails to ignite properly.
  • P0174 — Although the WRX has a single bank engine, on other platforms P0171 is often seen with P0174 (System Too Lean Bank 2), which would point to a shared issue like a MAF sensor or fuel pressure problem affecting both banks.

Technical Service Bulletins (TSBs) & Recalls

  • 02-17-20R: PCV Vacuum Hose Assembly- Design Change
  • Feb 2022 TechTIPS: P0171, Rough Running Condition After Cold Start (Intake Manifold Gasket Leak)

Platform-Specific Known Issues

Mechanic-Grade Diagnostic Values

  • Long-Term Fuel Trim (AF Learning 1) — expected: For the FA20DIT, values between -16% and +16% are considered acceptable by some tuners, though +/-8% is a healthier range.. Failure: Sustained values greater than +15% to +25% will typically trigger a P0171 code.
  • Mass Airflow (MAF) Rate at Idle — expected: Approximately 2.0 grams/second for the 2.0L FA20DIT engine at normal idle speed.. Failure: A significantly lower reading (e.g., 1.5 g/s) indicates the sensor is under-reporting air, while a much higher reading could suggest a wiring or sensor fault. A key test is to see if the g/s reading scales linearly with RPM; if the ratio of g/s to RPM changes dramatically as revs increase, the sensor is likely faulty.
  • High Pressure Fuel Pump (HPFP) Commanded Pressure — expected: Up to 150-170 bar (approx. 2175-2465 PSI) under load.. Failure: Inability to reach or maintain commanded pressure under load, which would require logging with a capable scan tool.
  • Low Pressure Fuel Pump (LPFP) Feed to HPFP — expected: Constant supply pressure of around 4 bar (approx. 58 PSI).. Failure: Pressure drop at the HPFP inlet, especially at high RPMs, indicates a weak in-tank pump.

Scan Tool Commands That Help

  • Cobb Accessport or Ecutek: Reset ECU / Reset AF Learning — This command should be used after any repair that could affect the air/fuel mixture, such as cleaning the MAF, fixing a vacuum leak, or replacing an O2 sensor. It forces the ECU to discard its learned long-term fuel trim values and start fresh, allowing for a faster and more accurate relearning process.
  • Subaru Select Monitor (SSM) or equivalent: A/F Learning Value — This allows a technician to view the learned fuel corrections across different engine load and RPM ranges (often displayed as A, B, C, D ranges). High positive values in the 'A' range (idle and low load) strongly suggest a vacuum leak, while high values in 'C' and 'D' ranges (high load) point more towards fuel delivery or MAF sensor scaling issues.

Wiring & Ground Locations

  • Main Engine Ground — Typically a strap from the engine block to the chassis. Also, a key grounding point is on the top of the intake manifold.. A poor engine ground can cause erratic behavior from all engine sensors, including the MAF and O2 sensors, leading to incorrect readings and fueling issues. iWire sells a popular grounding kit that adds grounds to the intake manifold, engine block, and alternator housing to solve these issues.
  • ECU Ground — The ECU has multiple ground pins within its main wiring harness connectors (e.g., on older models, pin 24 of plug B136 was a sensor ground). These wires are bundled and typically ground to the chassis near the ECU's location in the passenger footwell.. A compromised ECU ground can cause the ECU itself to malfunction, leading to a wide array of phantom codes and issues, including P0171.
  • MAF Sensor Connector — On the intake tract, after the air filter box.. Corrosion or damage to the MAF sensor connector or its extension harness (used on some aftermarket intakes) can cause incorrect or intermittent signal voltage, directly leading to P0171.
  • Interior Chassis Ground Points — Bolts under the dash, such as the one for the hood release latch or bolts on the clutch pedal assembly, are often used as ground points for aftermarket electronics.. While not a direct cause, understanding where good grounds are is critical if testing sensor circuits or ruling out bad grounds added by previous owners.

Real Owner Repair Stories

  • Reddit user 'proswimma' in r/WRX (FA20 WRX (year not specified)) — High AFRs and P0171 code, but only at idle.
    ❌ Tried (didn't work) Not specified, but implied that common causes like MAF cleaning and vacuum leak checks were performed over a period of months.
    ✅ What actually fixed it A small vacuum leak in the brake booster. It was replaced, which immediately fixed the idle lean condition. The user noted that a brand new OEM booster made it worse, but a used, low-mileage one worked perfectly.
  • YouTube channel 'BreakingThroughTogether' (2017 WRX) — P0171, rough running, multiple cylinder misfires.
    ❌ Tried (didn't work) Cleaning MAF and MAP sensors.
    ✅ What actually fixed it A vacuum cap that had been installed on an intake manifold port as part of a previous Air-Oil Separator (AOS) installation had popped off, creating a massive vacuum leak.
  • YouTube channel 'subtledriver' (STI (EJ engine, but relevant principle)) — P0171 lean code.
    ❌ Tried (didn't work) Initial diagnosis pointed to common causes.
    ✅ What actually fixed it Two O-rings on the in-tank fuel pump assembly were incorrectly installed (only one was used when two were required), causing a fuel pressure issue that led to the lean code.
  • NHTSA ODI #11712991 — An owner reported that their engine stalled with a P0171 code present and several dashboard lights illuminated; the vehicle would only crank but not start afterward.

"I Checked Everything" — The Actual Cause

  • A persistent P0171 that only occurs at idle, and does not show any leaks during a smoke test, is a classic symptom of an internal vacuum leak in the brake booster. The booster's diaphragm can leak, allowing unmetered air to be drawn into the intake manifold, but this leak is often internal and won't be revealed by smoke. The definitive test is to monitor short-term fuel trims while pressing and holding the brake pedal; a significant spike in trims indicates the booster is leaking.

When the Usual Fixes Don't Work

  • While cleaning the MAF sensor and performing a smoke test are the most common first steps, a significant number of resolved cases online only found the fix after these procedures failed. One of the most frequently cited 'after-all-else-fails' fixes for an idle-only P0171 was a leaking brake booster, a part not typically associated with a lean code by DIYers. Another case was traced to incorrectly installed O-rings on the in-tank fuel pump assembly, a fuel-side problem that mimics an air-side vacuum leak. These cases highlight the need to move beyond vacuum leak hunting and test the fuel delivery and ancillary vacuum systems (like the brake booster) if initial tests are inconclusive.

Model Year Variations Within This Range

  • 2017+: Forum discussions suggest that from 2017 onwards, Subaru may have made internal changes to the FA20DIT to address early issues like ringland failures that were more prevalent in 2015-2016 models. While not directly tied to P0171, a healthier engine is less prone to issues that could cause oil consumption and foul sensors.
  • Mid-2017 MY+: The factory pitch stop mount on the firewall was reportedly upgraded in the middle of the 2017 model year production run. This is unrelated to P0171 but is a known change within the vehicle's production timeline.
  • 2018+: Some forum users mention minor changes to PCV hose and wiring routing for 2018+ models, but these are not believed to impact performance or reliability significantly.

Diagnostic Flowchart

Real Owner Stories

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

Subaru WRX

Symptoms: Months-long battle with P0171 that was only apparent at idle.

What fixed it: Replaced a leaking brake booster.

Source hint: Reddit r/WRX - Thread 'P0171 Help'

Subaru WRX

Symptoms: P0171 lean code triggered by airflow turbulence over the MAF sensor.

What fixed it: Rotated the Cobb intake filter to correct the airflow.

Source hint: YouTube - subtledriver - 'p0171 lean code fixed on wrx! Cobb intake FAIL!'

2017 Subaru WRX

Symptoms: P0171 code triggered by a vacuum leak.

What fixed it: Replaced a vacuum cap that had popped off the intake manifold from a previous air-oil separator (AOS) installation.

Source hint: YouTube - Breaking Through Together - 'Engine code: P0171 | Troubleshooting & FIX | 2017 WRX'

2015 Subaru Forester XT (FA20DIT) — ~90000 miles

Symptoms: P0171 System Too Lean Bank 1 error code due to a degraded front O2 sensor.

What fixed it: Replaced the front O2 sensor with an OEM/Denso part.

Source hint: Reddit r/subaru - '(2015) P0171 System Too Lean Bank 1 error code.'

Subaru WRX

Symptoms: P0171 code caused by a fuel pressure issue.

What fixed it: Replaced two O-rings on the fuel pump assembly.

Source hint: Forum user cited in common causes

Documented NHTSA Reports

  • NHTSA ODI #11712991: An owner reported that their engine stalled with a P0171 code present and several dash lights illuminated; the vehicle would only crank but not start thereafter.
  • NHTSA ODI #11486440: A dealer diagnosis for a P0171 code identified an intermittent airflow sensor failure that was causing rich fuel conditions and affecting mileage.
  • NHTSA ODI #11329091: A report describes a P0171 diagnosis where no leaks were found, and the issue was addressed by cleaning the mass air flow sensor.
  • NHTSA ODI #10865341: A technician traced a P0171 fault to a vacuum leak around a cracked brake booster check valve.
  • NHTSA ODI #10496665: A vehicle entered limp mode with a P0171 code; the dealer diagnosis determined that the fuel line was disconnected.

Frequently Asked Questions

Why did my traction control and cruise control turn off when I got the P0171 code on my WRX?
Disabling systems like traction control, hill start assist, and cruise control is a standard Subaru safety feature whenever a Check Engine Light is triggered. It does not necessarily mean those systems are broken.
Are there any Technical Service Bulletins (TSBs) for the 2015-2021 WRX regarding the P0171 code?
Yes. TSB 02-17-20R addresses a design change for the PCV Vacuum Hose Assembly. Additionally, a February 2022 TechTIPS article notes that a rough running condition after a cold start with a P0171 can be caused by an intake manifold gasket leak.
I installed an aftermarket Air-Oil Separator (AOS) on my WRX. Could this cause a P0171?
Yes. A common issue after installing an AOS kit is that the vacuum caps used to block off intake manifold ports can pop off, creating a significant vacuum leak and triggering the lean code.
What brand of front O2 sensor should I buy for my FA20DIT engine?
It is highly recommended to use an OEM Subaru or Denso branded front Air/Fuel Ratio (O2) sensor. Forum users report issues when using other aftermarket brands.
Can my aftermarket Cobb intake cause a P0171 code?
Yes, the design or placement of an aftermarket intake filter (like a Cobb intake) can cause airflow turbulence over the MAF sensor, leading to incorrect readings. In some cases, simply rotating the filter can resolve the issue.
My WRX only runs lean at idle. What should I check?
If the lean condition only occurs at idle, you should investigate the brake booster. You can test this by monitoring fuel trims with a scan tool while pressing and releasing the brake pedal. NHTSA ODI #10865341 specifically mentions a cracked brake booster check valve as a cause for this code.
Engine code: P0171 | Troubleshooting & FIX | 2017 WRX
Engine code: P0171 | Troubleshooting & FIX | 2017 WRX
P0171 Mass Air Flow Sensor Cleaning
P0171 Mass Air Flow Sensor Cleaning
How to SMOKE TEST a Subaru WRX STI for VACCUM LEAKS!
How to SMOKE TEST a Subaru WRX STI for VACCUM LEAKS!
p0171 lean code fixed on wrx! Cobb intake FAIL!
p0171 lean code fixed on wrx! Cobb intake FAIL!
How to Test For a Bad Brake Booster / Brake Booster Testing
How to Test For a Bad Brake Booster / Brake Booster Testing
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 WRX: 2015201620172018201920202021
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